Skip to content

Commit

Permalink
Refactor fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
yhaliaw committed Nov 30, 2023
1 parent 6e87668 commit 2d186d7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ async def app_no_runner(
no_proxy=no_proxy,
reconcile_interval=60,
)
yield application
return application


@pytest_asyncio.fixture(scope="module")
Expand All @@ -173,7 +173,7 @@ async def app(model: Model, app_no_runner: Application) -> AsyncIterator[Applica
"""
await ensure_charm_has_runner(app=app_no_runner, model=model)

yield app_no_runner
return app_no_runner


@pytest_asyncio.fixture(scope="module")
Expand Down Expand Up @@ -212,7 +212,7 @@ async def app_scheduled_events(
await application.set_config({"virtual-machines": "1"})
await reconcile(app=application, model=model)

yield application
return application


@pytest_asyncio.fixture(scope="module")
Expand All @@ -239,7 +239,7 @@ async def app_runner(
no_proxy=no_proxy,
reconcile_interval=60,
)
yield application
return application


@pytest.fixture(scope="module")
Expand Down Expand Up @@ -272,7 +272,7 @@ def forked_github_repository(
else:
assert False, "timed out whilst waiting for repository creation"

yield forked_repository
return forked_repository

# Parallel runs of this test module is allowed. Therefore, the forked repo is not removed.

Expand Down Expand Up @@ -325,4 +325,4 @@ async def app_with_forked_repo(
await app.set_config({"path": forked_github_repository.full_name})
await ensure_charm_has_runner(app=app, model=model)

yield app
return app

0 comments on commit 2d186d7

Please sign in to comment.