Skip to content
Myr

Merge pull request #2436 from colindickson/master

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

Fix for failing test: test_connection_error

authored by Cory Benfield · committed by Cory Benfield · parents b137472, ced6550 · Browse files · 1 file+4 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+4 added−2 removed

  • other:+4 added−2 removed

1 file+4 added−2 removed

modified:test_requests.py+4 added-2 removed
299 unmodified lines
300 s.auth = auth301 r = s.get(url)302 assert r.status_code == 200303304 def test_connection_error(self):304 def test_connection_error_invalid_domain(self):305 """Connecting to an unknown domain should raise a ConnectionError"""306 with pytest.raises(ConnectionError):307 requests.get("http://fooobarbangbazbing.httpbin.org")307 requests.get("http://doesnotexist.google.com")308309 def test_connection_error_invalid_port(self):310 """Connecting to an invalid port should raise a ConnectionError"""311 with pytest.raises(ConnectionError):312 requests.get("http://httpbin.org:1")313314 def test_LocationParseError(self):
1288 unmodified lines