Skip to content

Commit 1d6a2fe

Browse files
fix: Add await for async tests
1 parent 271c279 commit 1d6a2fe

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/google-auth/tests_async/transport/test_aiohttp_requests.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,14 @@ async def test_unsupported_session(self):
121121
with pytest.raises(ValueError):
122122
await aiohttp_requests.Request(http)
123123

124-
def test_timeout(self):
125-
http = mock.create_autospec(
126-
aiohttp.ClientSession, instance=True, _auto_decompress=False
127-
)
128-
request = aiohttp_requests.Request(http)
129-
request(url="http://example.com", method="GET", timeout=5)
124+
@pytest.mark.asyncio
125+
async def test_timeout(self):
126+
http = mock.create_autospec(
127+
aiohttp.ClientSession, instance=True, _auto_decompress=False
128+
)
129+
request = aiohttp_requests.Request(http)
130+
await request(url="http://example.com", method="GET", timeout=5)
131+
130132

131133

132134
class CredentialsStub(google.auth._credentials_async.Credentials):

0 commit comments

Comments
 (0)