Lack of unit test for rally.common.util.EnumMixin

Bug #1473331 reported by Yuki Nishiwaki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rally
Fix Released
Low
Yuki Nishiwaki

Bug Description

Lack of unit test for rally.common.util.EnumMixin.

current unit test for EnumMixin is only as following

------

class EnumMixinTestCase(test.TestCase):

    def test_enum_mix_in(self):

        class Foo(utils.EnumMixin):
            a = 10
            b = 20
            CC = "2000"

        self.assertEqual(set(list(Foo())), set([10, 20, "2000"]))

----

But EnumMix Class have the feature that in iterator don't return value if the name of variable start under score ( like _a, _c ).

Therefore We should check this behavior at least

Changed in rally:
assignee: nobody → Yuki Nishiwaki (uckey-1067)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to rally (master)

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

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

Reviewed: https://review.openstack.org/200421
Committed: https://git.openstack.org/cgit/openstack/rally/commit/?id=86e8f947639385b75e6c3bb303eccb98a4dbf04e
Submitter: Jenkins
Branch: master

commit 86e8f947639385b75e6c3bb303eccb98a4dbf04e
Author: Yuki Nishiwaki <email address hidden>
Date: Fri Jul 10 17:34:45 2015 +0900

    Add unit test for common.utils.EnumMixin

    Add following unit test for common.utils.EnumMixin
     - Check if the name of variable start underscore (like _a), don't return value in iterate

    Change-Id: Ief17f1012a0fd6b7917d5a031e03f45e5d963123
    Closes-Bug: #1473331

Changed in rally:
status: In Progress → Fix Committed
Changed in rally:
milestone: none → 0.1.0
Changed in rally:
importance: Undecided → Low
Changed in rally:
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.