py27 tox tests fail with a TypeError

Bug #1537851 reported by Ryan Petrello
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
Fix Released
Critical
Federico Ceratto

Bug Description

Currently, tests run via `tox -epy27` are failing with a TypeError:

An example of the full traceback of the failure can be found here:

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "designate/tests/unit/test_backend/test_designate.py", line 78, in setUp
        self.backend = impl_designate.DesignateBackend(self.target)
      File "designate/backend/impl_designate.py", line 42, in __init__
        super(DesignateBackend, self).__init__(target)
      File "designate/backend/base.py", line 49, in __init__
        self.admin_context = DesignateContext.get_admin_context()
      File "designate/context.py", line 138, in get_admin_context
        return cls(None, **kwargs)
      File "designate/context.py", line 45, in __init__
        super(DesignateContext, self).__init__(
    TypeError: must be type, not MagicMock

======
Totals
======
Ran: 1249 tests in 81.0000 sec.
 - Passed: 1238
 - Skipped: 3
 - Expected Fail: 4
 - Unexpected Success: 0
 - Failed: 4

Kiall Mac Innes (kiall)
Changed in designate:
importance: Undecided → Critical
status: New → Triaged
assignee: nobody → Federico Ceratto (federico-ceratto)
milestone: none → mitaka-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.openstack.org/272219

Changed in designate:
assignee: Federico Ceratto (federico-ceratto) → Kiall Mac Innes (kiall)
status: Triaged → In Progress
Kiall Mac Innes (kiall)
Changed in designate:
assignee: Kiall Mac Innes (kiall) → Federico Ceratto (federico-ceratto)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (master)

Reviewed: https://review.openstack.org/272219
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=eba1f9e9b4e5f67b94fdb15192359d09bd0dba72
Submitter: Jenkins
Branch: master

commit eba1f9e9b4e5f67b94fdb15192359d09bd0dba72
Author: Kiall Mac Innes <email address hidden>
Date: Mon Jan 25 18:36:43 2016 +0000

    Ensure mocks are stopped after use

    When a mock is stated by hand, rather than used as a decorator
    or context manager, care must be take to stop the mock before
    the next test.

    Change-Id: Iceb1a4fc80d5e895a5644134e8e95f06c5421f47
    Partial-Bug: 1537851

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/273723

Changed in designate:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to designate (stable/liberty)

Reviewed: https://review.openstack.org/273723
Committed: https://git.openstack.org/cgit/openstack/designate/commit/?id=67175e7a1928b281e6e94516fcd77874166cbb14
Submitter: Jenkins
Branch: stable/liberty

commit 67175e7a1928b281e6e94516fcd77874166cbb14
Author: Kiall Mac Innes <email address hidden>
Date: Mon Jan 25 18:36:43 2016 +0000

    Ensure mocks are stopped after use

    When a mock is stated by hand, rather than used as a decorator
    or context manager, care must be take to stop the mock before
    the next test.

    Change-Id: Iceb1a4fc80d5e895a5644134e8e95f06c5421f47
    Partial-Bug: 1537851
    (cherry picked from commit eba1f9e9b4e5f67b94fdb15192359d09bd0dba72)

tags: added: in-stable-liberty
Changed in designate:
status: Fix Committed → Won't Fix
status: Won't Fix → Fix Committed
Changed in designate:
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.