Most of test_hacking.py doesn't use _assert_has_errors()

Bug #1512802 reported by Ryan Rossiter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Ryan Rossiter

Bug Description

test_hacking.py has _assert_has_errors() and _assert_has_no_errors() (https://github.com/openstack/magnum/blob/master/magnum/tests/unit/test_hacking.py#L70-L77) for checking "code" (a string) against a hacking check.

Most checks in the tests are using assertEqual to make sure the hacking regex is found within the given string. Using the assertion fixtures is easier to read and understand.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
assignee: nobody → Ryan Rossiter (rlrossit)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/241339
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=54414cdbb0511c71c8214d0a216078417213190f
Submitter: Jenkins
Branch: master

commit 54414cdbb0511c71c8214d0a216078417213190f
Author: Ryan Rossiter <email address hidden>
Date: Tue Nov 3 19:10:48 2015 +0000

    Use _assert_has_(no)_errors() in hacking tests

    _assert_has_errors() and _assert_has_no_errors() us much easier to read
    and understand. This change switches over the tests to use those fixture
    methods.

    Change-Id: I4aa8f973d1be34739a7fb2edcf85a956b2cf7859
    Closes-Bug: #1512802

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
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.