Skip to content

Commit 5c372a9

Browse files
authored
chore: update secret and fix pytest issue (#1868)
1 parent 89a8838 commit 5c372a9

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

system_tests/secrets.tar.enc

0 Bytes
Binary file not shown.

tests/transport/aio/test_sessions.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,13 @@
3232

3333

3434
@pytest.fixture
35-
async def simple_async_task():
36-
return True
35+
def simple_async_task():
36+
# Wrap async fixture within a synchronous fixture to suppress pytest.PytestRemovedIn9Warning
37+
# See https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture
38+
async def inner_fixture():
39+
return True
40+
41+
return inner_fixture()
3742

3843

3944
class MockRequest(Request):
@@ -151,10 +156,15 @@ class TestAsyncAuthorizedSession(object):
151156
credentials = AnonymousCredentials()
152157

153158
@pytest.fixture
154-
async def mocked_content(self):
155-
content = [b"Cavefish ", b"have ", b"no ", b"sight."]
156-
for chunk in content:
157-
yield chunk
159+
def mocked_content(self):
160+
# Wrap async fixture within a synchronous fixture to suppress pytest.PytestRemovedIn9Warning
161+
# See https://docs.pytest.org/en/stable/deprecations.html#sync-test-depending-on-async-fixture
162+
async def inner_fixture():
163+
content = [b"Cavefish ", b"have ", b"no ", b"sight."]
164+
for chunk in content:
165+
yield chunk
166+
167+
return inner_fixture()
158168

159169
@pytest.mark.asyncio
160170
async def test_constructor_with_default_auth_request(self):

0 commit comments

Comments
 (0)