Skip to content

Commit 6c32f40

Browse files
authored
Merge pull request #737 from sanders41/refactor-test-clients
Change client scopes to function
2 parents f33af0e + 103d650 commit 6c32f40

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

tests/conftest.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,13 @@
2626
SMALL_MOVIES_PATH = ROOT_PATH / "datasets" / "small_movies.json"
2727

2828

29-
@pytest.fixture(scope="session", autouse=True)
30-
def event_loop():
31-
try:
32-
loop = asyncio.get_running_loop()
33-
except RuntimeError:
34-
loop = asyncio.new_event_loop()
35-
yield loop
36-
loop.close()
37-
38-
39-
@pytest.fixture(scope="session")
29+
@pytest.fixture
4030
async def async_client():
4131
async with AsyncClient(BASE_URL, MASTER_KEY) as client:
4232
yield client
4333

4434

45-
@pytest.fixture(scope="session")
35+
@pytest.fixture
4636
def client():
4737
yield Client(BASE_URL, MASTER_KEY)
4838

0 commit comments

Comments
 (0)