Test server configuration helper functions

This commit is contained in:
Julian Stirling 2025-08-22 23:11:27 +01:00
parent a0f7441a42
commit 405299b221
3 changed files with 144 additions and 12 deletions

19
tests/conftest.py Normal file
View file

@ -0,0 +1,19 @@
"""Provide fixtures that can be reused by the entire test suite.
For more information on this pattern see:
https://docs.pytest.org/en/stable/reference/fixtures.html#conftest-py-sharing-fixtures-across-multiple-files
"""
import pytest
@pytest.fixture
def mock_app(mocker):
"""Return a mock FastAPI app.
This is just a mock, where the get method returns a mock.
"""
wrapper = mocker.Mock()
app = mocker.Mock()
app.get.return_value = wrapper
return app