Skip to content
Myr

external tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Kenneth Reitz · committed by Kenneth Reitz · parent 4114b04 · Browse files · 1 file+45 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+45 added−0 removed

  • other:+45 added−0 removed

1 file+45 added−0 removed

added:test_requests_ext.py+45 added
1#!/usr/bin/env python2# -*- coding: utf-8 -*-34from __future__ import with_statement56import unittest78import requests910try:11 import omnijson as json12except ImportError:13 import json141516class RequestsTestSuite(unittest.TestCase):17 """Requests test cases."""1819 # It goes to eleven.20 _multiprocess_can_split_ = True2122 def test_addition(self):23 assert (1 + 1) == 22425 def test_ssl_hostname_ok(self):26 requests.get('https://github.com', verify=True)2728 def test_ssl_hostname_not_ok(self):29 requests.get('https://kennethreitz.com', verify=False)3031 self.assertRaises(requests.exceptions.SSLError, requests.get, 'https://kennethreitz.com', verify=True)3233 def test_ssl_hostname_session_not_ok(self):3435 s = requests.session(verify=True)3637 s.get('https://kennethreitz.com', verify=False)3839 self.assertRaises(requests.exceptions.SSLError, s.get, 'https://kennethreitz.com')40414243if __name__ == '__main__':44 unittest.main()45