(
mock_datasources, mock_plugins, mock_get, mock_collection
)
| 34 | @mock.patch("importer.all.import_datasources_from_env", return_value=None) |
| 35 | @pytest.mark.asyncio |
| 36 | async 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()) |
nothing calls this directly
no test coverage detected