indexer: Simplify the init step for the last tests
- tests: Simplify init step
This is probably either in conflict with !59 (closed) or need to be rebased after it.
fossology_license: Fix docstring
Test Plan
tox
Migrated from D742 (view on Phabricator)
Merge request reports
Activity
357 357 for item in self.revision_metadata.get(id_): 358 358 item = item.copy() 359 359 tool_id = item.pop('indexer_configuration_id') 360 item['tool'] = self.tools[tool_id].copy() 360 if tool_id in self.tools: 361 item['tool'] = self.tools[tool_id].copy() 362 else: # HACK: this needs to be removed altogether 363 item['tool'] = { 364 'id': tool_id, 365 'name': tool_id[0], 366 'version': tool_id[1], 367 'configuration': tool_id[2], 368 } In that case, the tests simply won't work. the tool_id does not exist.
That's a test initialization issue. the tool_id somehow is a one from the memory storage. I don't get from where that comes from since it's supposed to be mock storage all around.
All this class should go away as that's not tractable in the current state. So i'm for this ugly hack in the mean time (which will get trashed pretty soon).
Build is green See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/80/ for more details.
Build is green See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/81/ for more details.
Build is green See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/83/ for more details.
Build is green See https://jenkins.softwareheritage.org/job/DCIDX/job/tox/89/ for more details.