Skip to content
Snippets Groups Projects

indexer: Simplify the init step for the last tests

1 unresolved thread
  • 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

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
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 }
  • No, that should raise an error.

  • 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).

  • Please register or sign in to reply
  • Merge request was returned for changes

  • Remove spurious noise

    • Remove hack
  • Get back the diff to its feet

    The diff got changed by error and i no longer see the right state there.

  • Merge request was accepted

  • vlorentz approved this merge request

    approved this merge request

  • Merge request was merged

  • Please register or sign in to reply
    Loading