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

View file

@ -11,18 +11,6 @@ from starlette.responses import FileResponse, RedirectResponse
from openflexure_microscope_server.server import serve_static_files
@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
@pytest.fixture
def mock_static_dir():
"""Return the path of a mock static directory.