MCPcopy Create free account
hub / github.com/IQEngine/IQEngine / test_api_get_config

Function test_api_get_config

api/tests/test_api.py:12–33  ·  view source on GitHub ↗
(client)

Source from the content-addressed store, hash-verified

10
11@pytest.mark.asyncio
12async 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

Callers

nothing calls this directly

Calls 2

ConfigurationClass · 0.90
getMethod · 0.65

Tested by

no test coverage detected