Skip to content

Commit

Permalink
mock api_doc
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis committed Dec 17, 2024
1 parent 01d07c4 commit 568e992
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/web/server/tests/unit/isolated/test_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from unittest.mock import Mock

import pytest
from pytest_mock import MockerFixture
from servicelib.aiohttp.application_setup import APP_SETUP_COMPLETED_KEY
from simcore_service_webserver.application_settings import setup_settings
from simcore_service_webserver.diagnostics.plugin import setup_diagnostics
Expand Down Expand Up @@ -35,12 +36,14 @@ def add_routes(self, *args, **kwargs):


@pytest.fixture
def app_mock():
def app_mock(mocker: MockerFixture):
app = MockApp()

# emulates security is initialized
app[APP_SETUP_COMPLETED_KEY] = ["simcore_service_webserver.security"]

mocker.patch("simcore_service_webserver.rest.plugin.api_doc")

return app


Expand Down

0 comments on commit 568e992

Please sign in to comment.