Skip to content

Commit e8f05fa

Browse files
committed
chore: mock headers to avoid warnings in the test run
1 parent 2d487dd commit e8f05fa

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

test/ably/rest/restauth_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ async def test_request_basic_auth_header(self):
8585
ably = AblyRest(key_secret='foo', key_name='bar')
8686

8787
with mock.patch.object(AsyncClient, 'send') as get_mock:
88+
get_mock.return_value = {"status": 200, "headers": {}}
8889
try:
8990
await ably.http.get('/time', skip_auth=False)
9091
except Exception:
@@ -98,6 +99,7 @@ async def test_request_basic_auth_header_with_client_id(self):
9899
ably = AblyRest(key_secret='foo', key_name='bar', client_id='client_id')
99100

100101
with mock.patch.object(AsyncClient, 'send') as get_mock:
102+
get_mock.return_value = {"status": 200, "headers": {}}
101103
try:
102104
await ably.http.get('/time', skip_auth=False)
103105
except Exception:
@@ -110,6 +112,7 @@ async def test_request_token_auth_header(self):
110112
ably = AblyRest(token='not_a_real_token')
111113

112114
with mock.patch.object(AsyncClient, 'send') as get_mock:
115+
get_mock.return_value = {"status": 200, "headers": {}}
113116
try:
114117
await ably.http.get('/time', skip_auth=False)
115118
except Exception:

0 commit comments

Comments
 (0)