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

Function test_import_feature_flags_from_env

api/tests/test_importer.py:36–46  ·  view source on GitHub ↗
(
    mock_datasources, mock_plugins, mock_get, mock_collection
)

Source from the content-addressed store, hash-verified

34@mock.patch("importer.all.import_datasources_from_env", return_value=None)
35@pytest.mark.asyncio
36async def test_import_feature_flags_from_env(
37 mock_datasources, mock_plugins, mock_get, mock_collection
38):
39 os.environ["IQENGINE_FEATURE_FLAGS"] = '{"test": true}'
40
41 mock_collection.return_value.insert_one = AsyncMock()
42 mock_collection.return_value.insert_one.return_value = None
43
44 await import_all_from_env()
45
46 mock_collection.return_value.insert_one.assert_called_once()
47
48
49@mock.patch("importer.plugins.plugin_repo.collection", return_value=Mock())

Callers

nothing calls this directly

Calls 1

import_all_from_envFunction · 0.90

Tested by

no test coverage detected