File tree Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Expand file tree Collapse file tree 2 files changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def __init__(
54
54
self .proxy = proxy
55
55
self ._close_session = False # Never close a provided session
56
56
# Extract timeout from session
57
- self ._client_timeout = session ._timeout
57
+ self ._client_timeout = session .timeout
58
58
59
59
async def __aenter__ (self ) -> AIOHTTPTransport :
60
60
"""Enter async context."""
Original file line number Diff line number Diff line change @@ -15,12 +15,10 @@ def create_mock_session(timeout=None):
15
15
mock_session = Mock (spec = aiohttp .ClientSession )
16
16
if timeout :
17
17
mock_session .timeout = timeout
18
- mock_session ._timeout = timeout # Some code accesses private attribute
19
18
else :
20
19
# Create a default timeout object
21
20
default_timeout = Mock (total = 300 , sock_read = None )
22
21
mock_session .timeout = default_timeout
23
- mock_session ._timeout = default_timeout # Some code accesses private attribute
24
22
return mock_session
25
23
26
24
You can’t perform that action at this time.
0 commit comments