Skip to content
Myr

assert connect timeout inheritance

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

authored by Kevin Burke · committed by Kevin Burke · parent 8f9ce13 · 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
17 unmodified lines
18from requests.compat import (19 Morsel, cookielib, getproxies, str, urljoin, urlparse, is_py3, builtin_str)20from requests.cookies import cookiejar_from_dict, morsel_to_cookie21from requests.exceptions import (InvalidURL, MissingSchema, ConnectTimeout,22 ReadTimeout)22 ReadTimeout, ConnectionError, Timeout)23from requests.models import PreparedRequest24from requests.structures import CaseInsensitiveDict25from requests.sessions import SessionRedirectMixin26from requests.models import urlencode
1320 unmodified lines
1347 def test_connect_timeout(self):1348 try:1349 requests.get(TARPIT, timeout=(0.1, None))1350 assert False, "The connect() request should time out."1351 except ConnectTimeout:1351 except ConnectTimeout as e:1352 pass1353 assert isinstance(e, ConnectionError)1354 assert isinstance(e, Timeout)13551356 def test_total_timeout_connect(self):1357 try:1358 requests.get(TARPIT, timeout=(0.1, 0.1))
124 unmodified lines