Uploaded image for project: 'Aurora'
  1. Aurora
  2. AURORA-892

Improve specs for command line option mocks in Python tests

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.8.0
    • Technical Debt, Testing
    • None

    Description

      When trying to mock the objects generated by our command line options wrappers, we use specs. e.g.

          mock_options = Mock(spec_set=['cluster', 'disable_all_hooks', 'duration', 'filename', 'grouping',
            'hosts', 'percentage', 'post_drain_script', 'reason', 'unsafe_hosts_filename', 'verbosity'])
      

      These specs are duplicating strings defined in the command verbs and nouns. We should instead look to introspect our commands and pull the list of acceptable options from there - and use that to define our specs.

      Attachments

        Activity

          People

            davmclau David McLaughlin
            davmclau David McLaughlin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: