Skip to content
Myr

Merge branch 'kaptajnen-master'

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 · parents a8bfa82, 00c6ad5 · Browse files · 2 files+5 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

2 files+5 added−0 removed

  • tests:+4 added−0 removed
  • other:+1 added−0 removed

2 files+5 added−0 removed

modified:requests/adapters.py+1 added
239 unmodified lines
240 conn.cert_file = cert[0]241 conn.key_file = cert[1]242 else:243 conn.cert_file = cert244 conn.key_file = None245 if conn.cert_file and not os.path.exists(conn.cert_file):246 raise IOError("Could not find the TLS certificate file, "247 "invalid path: {0}".format(conn.cert_file))248 if conn.key_file and not os.path.exists(conn.key_file):
271 unmodified lines
modified:tests/test_requests.py+4 added
784 unmodified lines
785 with pytest.raises(IOError) as e:786 requests.get(httpbin_secure(), cert=('.', INVALID_PATH))787 assert str(e.value) == 'Could not find the TLS key file, invalid path: {0}'.format(INVALID_PATH)788789 def test_http_with_certificate(self, httpbin):790 r = requests.get(httpbin(), cert='.')791 assert r.status_code == 200792793 def test_https_warnings(self, httpbin_secure, httpbin_ca_bundle):794 """warnings are emitted with requests.get"""795 if HAS_MODERN_SSL or HAS_PYOPENSSL:796 warnings_expected = ('SubjectAltNameWarning', )
1583 unmodified lines