Comment 10 for bug 1510007

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic-python-agent (master)

Reviewed: https://review.openstack.org/330451
Committed: https://git.openstack.org/cgit/openstack/ironic-python-agent/commit/?id=1e8652a8d038c3795b903c9eba02a6b0a8a5b872
Submitter: Jenkins
Branch: master

commit 1e8652a8d038c3795b903c9eba02a6b0a8a5b872
Author: Edan David <email address hidden>
Date: Thu Jun 16 06:40:03 2016 -0400

    Use assertIn and assertNotIn

    Tests should use:
      self.assertIn(value, list)
      self.assertNotIn(value, list)

    instead of:
      self.assertTrue(value in list)
      self.assertFalse(value in list)

    because assertIn and assertNotIn raise more meaningful errors:
      self.assertIn(3, [1, 2]
      >>> MismatchError: 3 not in [1, 2]

      self.assertTrue(3 in [1, 2])
      >>> AssertionError: False is not true

    Change-Id: I2d1c78fe71fe03e350b1035123b0a48b7186a6ec
    Closes-Bug: #1510007