@pytest.fixture
def mocked_director_service_fcts(minimal_app: FastAPI, fake_service_details: ServiceDockerData, fake_service_extras: ServiceExtras, fake_running_service_details: RunningServiceDetails):
    with respx.mock(base_url=minimal_app.state.settings.director_v0.base_url(include_tag=False), assert_all_called=False, assert_all_mocked=True) as respx_mock:
        respx_mock.get('/v0/services/simcore%2Fservices%2Fdynamic%2Fmyservice/1.3.4', content={'data': [fake_service_details.dict(by_alias=True)]}, alias='get_service_version')
        respx_mock.get('/v0/service_extras/simcore%2Fservices%2Fdynamic%2Fmyservice/1.3.4', content={'data': fake_service_extras.dict(by_alias=True)}, alias='get_service_extras')
        pattern = re.compile('v0/running_interactive_services/[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$')
        respx_mock.get(pattern, content={'data': fake_running_service_details.dict(by_alias=True)}, alias='get_running_service_details')
        (yield respx_mock)
@pytest.fixture
def mocked_director_service_fcts(minimal_app: FastAPI, fake_service_details: ServiceDockerData, fake_service_extras: ServiceExtras, fake_running_service_details: RunningServiceDetails):
    with respx.mock(base_url=minimal_app.state.settings.director_v0.base_url(include_tag=False), assert_all_called=False, assert_all_mocked=True) as respx_mock:
        respx_mock.get('/v0/services/simcore%2Fservices%2Fdynamic%2Fmyservice/1.3.4', content={'data': [fake_service_details.dict(by_alias=True)]}, alias='get_service_version')
        respx_mock.get('/v0/service_extras/simcore%2Fservices%2Fdynamic%2Fmyservice/1.3.4', content={'data': fake_service_extras.dict(by_alias=True)}, alias='get_service_extras')
        pattern = re.compile('v0/running_interactive_services/[0-9a-fA-F]{8}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{4}-?[0-9a-fA-F]{12}$')
        respx_mock.get(pattern, content={'data': fake_running_service_details.dict(by_alias=True)}, alias='get_running_service_details')
        (yield respx_mock)