Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/storage/test_storage.py
Show First 20 Lines • Show All 1,595 Lines • ▼ Show 20 Lines | def test_indexer_configuration_metadata_get_missing_context(self): | ||||
actual_tool = self.storage.indexer_configuration_get(tool) | actual_tool = self.storage.indexer_configuration_get(tool) | ||||
self.assertIsNone(actual_tool) | self.assertIsNone(actual_tool) | ||||
def test_indexer_configuration_metadata_get(self): | def test_indexer_configuration_metadata_get(self): | ||||
tool = { | tool = { | ||||
'tool_name': 'swh-metadata-translator', | 'tool_name': 'swh-metadata-translator', | ||||
'tool_version': '0.0.1', | 'tool_version': '0.0.1', | ||||
'tool_configuration': {"type": "local", "context": "npm"}, | 'tool_configuration': {"type": "local", "context": "NpmMapping"}, | ||||
} | } | ||||
actual_tool = self.storage.indexer_configuration_get(tool) | actual_tool = self.storage.indexer_configuration_get(tool) | ||||
expected_tool = tool.copy() | expected_tool = tool.copy() | ||||
expected_tool['id'] = actual_tool['id'] | expected_tool['id'] = actual_tool['id'] | ||||
self.assertEqual(expected_tool, actual_tool) | self.assertEqual(expected_tool, actual_tool) | ||||
Show All 11 Lines |