Skip to content

Commit

Permalink
Add pytest fixture for base ASGI app
Browse files Browse the repository at this point in the history
  • Loading branch information
br3ndonland committed Sep 13, 2020
1 parent 2a56650 commit 62d2e32
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from inboard import gunicorn_conf as gunicorn_conf_module
from inboard import logging_conf as logging_conf_module
from inboard.app import prestart as pre_start_module
from inboard.app.base.main import app as base_app
from inboard.app.fastapibase.main import app as fastapi_app
from inboard.app.starlettebase.main import app as starlette_app

Expand All @@ -39,6 +40,12 @@ def basic_auth(
return username, password


@pytest.fixture(scope="session")
def client_asgi() -> TestClient:
"""Instantiate test client classes."""
return TestClient(base_app)


@pytest.fixture(scope="session")
def clients() -> List[TestClient]:
"""Instantiate test client classes."""
Expand Down

0 comments on commit 62d2e32

Please sign in to comment.