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

Function test_api_get_config_feature_flags

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

Source from the content-addressed store, hash-verified

35
36@pytest.mark.asyncio
37async def test_api_get_config_feature_flags(client):
38 os.environ["IQENGINE_CONNECTION_INFO"] = "{}"
39 os.environ["IQENGINE_GOOGLE_ANALYTICS_KEY"] = "google_analytics_key"
40 os.environ["IQENGINE_INTERNAL_BRANDING"] = "internal_branding_string"
41 os.environ["IQENGINE_APP_ID"] = "app_id"
42 os.environ["IQENGINE_APP_AUTHORITY"] = "app_authority"
43
44 test_get_config = Configuration()
45 test_get_config.feature_flags = {"test": True}
46
47 with mock.patch("handlers.config.get", return_value=test_get_config):
48 response = client.get("/api/config")
49 assert response.status_code == 200
50 assert response.json() == {
51 "connectionInfo": {},
52 "googleAnalyticsKey": "google_analytics_key",
53 "featureFlags": {"test": True},
54 "internalBranding": "internal_branding_string",
55 "appId": "app_id",
56 "appAuthority": "app_authority",
57 "uploadPageBlobSasUrl": None,
58 "hasAIQuery": False,
59 }
60
61
62# This test no longer valid as URL will never be valid with made up account and container

Callers

nothing calls this directly

Calls 2

ConfigurationClass · 0.90
getMethod · 0.65

Tested by

no test coverage detected