Some tests that already have context set it again

Bug #1373979 reported by Vladyslav Drok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Wishlist
Vladyslav Drok

Bug Description

Some test case classes that inherit from ironic.tests.db.base.DbTestCase set context in their setUp method, while it is already initialized in DbTestCase's setUp method.

Example:

class NodeSetBootDeviceTestCase(base.DbTestCase):
    def setUp(self):
        super(NodeSetBootDeviceTestCase, self).setUp()
        self.context = context.get_admin_context()
        self.dbapi = dbapi.get_instance()

Vladyslav Drok (vdrok)
Changed in ironic:
assignee: nobody → Vladyslav Drok (vdrok)
Changed in ironic:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

Changed in ironic:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ironic (master)

Reviewed: https://review.openstack.org/124073
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=760a9798f34675a4a03237de6b74349b3ab2e643
Submitter: Jenkins
Branch: master

commit 760a9798f34675a4a03237de6b74349b3ab2e643
Author: Vladyslav Drok <email address hidden>
Date: Thu Sep 25 17:47:06 2014 +0300

    Remove unneeded context initialization in tests

    Some test case classes that inherit from
    ironic.tests.db.base.DbTestCase set context in their setUp method,
    while it is already initialized in DbTestCase's setUp method. This
    change removes such unneeded initializations.

    Closes-bug: #1373979
    Change-Id: I7ab07168f1f30b4544801a1798cbda191c8d15c7

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: juno-rc1 → 2014.2
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.