Skip to content
Myr

Added failing test for issue #380.

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

authored by Cory Benfield · committed by Cory Benfield · parent 8e2696b · Browse files · 1 file+13 added−2 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+13 added−2 removed

  • tests:+13 added−2 removed

1 file+13 added−2 removed

modified:tests/test_requests.py+13 added-2 removed
21 unmodified lines
22from requests.auth import HTTPBasicAuth, HTTPDigestAuth23242526if (sys.platform == 'win32') and ('HTTPBIN_URL' not in os.environ):27 os.environ['HTTPBIN_URL'] = 'http://httpbin.org/'26os.environ['HTTPBIN_URL'] = 'http://httpbin.org/'2728# TODO: Detect an open port.29PORT = os.environ.get('HTTPBIN_PORT', '7077')30HTTPBIN_URL = os.environ.get('HTTPBIN_URL', 'http://0.0.0.0:%s/' % (PORT))
780 unmodified lines
811 def test_upload_binary_data(self):812813 r = requests.get(httpbin('post'), auth=('a', 'b'), data='\xff')814815 def test_useful_exception_for_invalid_schema(self):816 817 try:818 self.assertRaises(819 requests.exceptions.URLRequired,820 get,821 'http://http://')822 # To make this test as minimal as possible, only catch the823 # exception raised in issue #380.824 except ValueError:825 self.fail()826827828829if __name__ == '__main__':830 unittest.main()