mirror of
https://github.com/evroon/bracket.git
synced 2026-01-19 03:28:41 -05:00
20 lines
465 B
Python
20 lines
465 B
Python
# pylint: disable=redefined-outer-name
|
|
from collections.abc import AsyncIterator
|
|
|
|
import pytest
|
|
|
|
from tests.integration_tests.api.shared import UvicornTestServer
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
async def startup_and_shutdown_uvicorn_server() -> AsyncIterator[None]:
|
|
"""
|
|
Start server as test fixture and tear down after test
|
|
"""
|
|
server = UvicornTestServer()
|
|
try:
|
|
await server.up()
|
|
yield
|
|
finally:
|
|
await server.down()
|