Changeset View
Changeset View
Standalone View
Standalone View
swh/indexer/tests/test_utils.py
Show First 20 Lines • Show All 135 Lines • ▼ Show 20 Lines | def indexer_configuration_add(self, tools): | ||||
return [{ | return [{ | ||||
'id': 7, | 'id': 7, | ||||
'tool_name': 'swh-metadata-detector', | 'tool_name': 'swh-metadata-detector', | ||||
'tool_version': '0.0.1', | 'tool_version': '0.0.1', | ||||
'tool_configuration': { | 'tool_configuration': { | ||||
'type': 'local', | 'type': 'local', | ||||
'context': 'npm' | 'context': 'npm' | ||||
}, | }, | ||||
}] | }] | ||||
zack: should be updated according to the name change suggested above | |||||
elif tool['tool_name'] == 'origin-metadata': | |||||
return [{ | |||||
Done Inline Actionsyou should probably use a different id (even if this is a mock storage) moranegg: you should probably use a different id (even if this is a mock storage) | |||||
'id': 8, | |||||
'tool_name': 'origin-metadata', | |||||
'tool_version': '0.0.1', | |||||
'tool_configuration': {}, | |||||
}] | |||||
else: | |||||
assert False, 'Unknown tool {tool_name}'.format(**tool) | |||||
def content_metadata_missing(self, sha1s): | def content_metadata_missing(self, sha1s): | ||||
yield from [] | yield from [] | ||||
def content_metadata_add(self, metadata, conflict_update=None): | def content_metadata_add(self, metadata, conflict_update=None): | ||||
self.state = metadata | self.state = metadata | ||||
self.conflict_update = conflict_update | self.conflict_update = conflict_update | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |
should be updated according to the name change suggested above