We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6bd020 commit 44bc47fCopy full SHA for 44bc47f
tests/conftest.py
@@ -175,6 +175,15 @@ def get_fresh_app(keycloak_enabled: bool) -> FastAPI | Any:
175
176
ENV.ML_API_MIDDLEWARE_KEYCLOAK = keycloak_enabled
177
178
+ # Mock the get_openremote_issuers function if keycloak is enabled
179
+ if keycloak_enabled:
180
+ import service_ml_forecast.dependencies
181
+
182
+ def mock_get_openremote_issuers() -> list[str]:
183
+ return [f"{MOCK_KEYCLOAK_URL}/realms/master"]
184
185
+ service_ml_forecast.dependencies.get_openremote_issuers = mock_get_openremote_issuers
186
187
# Import the app fresh
188
import service_ml_forecast.main
189
0 commit comments