Test server configuration helper functions
This commit is contained in:
parent
a0f7441a42
commit
405299b221
3 changed files with 144 additions and 12 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue