Python 2.6 assertIn/NotIn

Bug #1078473 reported by Joshua Harlow
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
Undecided
Unassigned

Bug Description

Some tests are failing on 2.6 due to the following:

======================================================================
ERROR: test_message_present (tests.unittests.test_handler.test_handler_power_state.TestLoadPowerState)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/homes/harlowja/dev/os/cloud-init/tests/unittests/test_handler/test_handler_power_state.py", line 51, in test_message_present
    self.assertIn(cfg['power_state']['message'], ret[0])
AttributeError: 'TestLoadPowerState' object has no attribute 'assertIn'

======================================================================
ERROR: test_no_message (tests.unittests.test_handler.test_handler_power_state.TestLoadPowerState)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/homes/harlowja/dev/os/cloud-init/tests/unittests/test_handler/test_handler_power_state.py", line 57, in test_no_message
    self.assertNotIn("", cmd)
AttributeError: 'TestLoadPowerState' object has no attribute 'assertNotIn'

----------------------------------------------------------------------
Ran 165 tests in 1.275s

FAILED (errors=2)
gmake: *** [test] Error 1

Seems like these were added in 2.7.

Related branches

Joshua Harlow (harlowja)
Changed in cloud-init:
status: New → Fix Committed
Scott Moser (smoser)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.