Deprecation warning breaks Node model tests

Bug #1372735 reported by Jeroen T. Vermeulen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Jeroen T. Vermeulen

Bug Description

When I run the Node model tests in isolation, no matter how many, I get exactly one failure like:

«
FAIL: maasserver.models.tests.test_node.NodeManagerTest_StartNodes.test__sets_user_data
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "src/maasserver/models/tests/test_node.py", line 1622, in test__sets_user_data
    self.assertEqual("", twisted_log.dump())
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 321, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 406, in assertThat
    raise mismatch_error
MismatchError: !=:
reference = u''
actual = u'src/metadataserver/fields.py:58: exceptions.DeprecationWarning: object.__init__() takes no parameters'
»

A lot of model tests check the Twisted error log, and aren't expecting to find this DeprecationWarning there. It looks as if the warning only comes once per test run, and so whatever test does this check first will fail. The others are unaffected.

Tags: tests

Related branches

Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
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.