(client)
| 10 | |
| 11 | @pytest.mark.asyncio |
| 12 | async def test_api_get_config(client): |
| 13 | os.environ["IQENGINE_CONNECTION_INFO"] = "{}" |
| 14 | os.environ["IQENGINE_GOOGLE_ANALYTICS_KEY"] = "google_analytics_key" |
| 15 | os.environ["IQENGINE_INTERNAL_BRANDING"] = "internal_branding_string" |
| 16 | os.environ["IQENGINE_APP_ID"] = "app_id" |
| 17 | os.environ["IQENGINE_APP_AUTHORITY"] = "app_authority" |
| 18 | |
| 19 | test_get_config = Configuration() |
| 20 | |
| 21 | with mock.patch("handlers.config.get", return_value=test_get_config): |
| 22 | response = client.get("/api/config") |
| 23 | assert response.status_code == 200 |
| 24 | assert response.json() == { |
| 25 | "connectionInfo": {}, |
| 26 | "googleAnalyticsKey": "google_analytics_key", |
| 27 | "featureFlags": None, |
| 28 | "internalBranding": "internal_branding_string", |
| 29 | "appId": "app_id", |
| 30 | "appAuthority": "app_authority", |
| 31 | "uploadPageBlobSasUrl": None, |
| 32 | "hasAIQuery": False, |
| 33 | } |
| 34 | |
| 35 | |
| 36 | @pytest.mark.asyncio |
nothing calls this directly
no test coverage detected