The incoming parameters of assertEqual function are reversed

Bug #1490370 reported by xiangxinyong
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-muranoclient
Fix Released
Medium
xiangxinyong

Bug Description

The incoming parameters of assertEqual function are reversed in MuranoClient.

For example.

self.assertEqual(self.client.packages.create.call_count, 2)

According the definition of assertEqual as below, it is reversed.

def assertEqual(self, expected, observed, message=''):
        :param expected: The expected value.
        :param observed: The observed value.
        :param message: An optional message to include in the error.

It may create misunderstanding about unit test.

Changed in python-muranoclient:
assignee: nobody → xiangxinyong (xiangxinyong)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-muranoclient (master)

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

Changed in python-muranoclient:
status: New → In Progress
Changed in python-muranoclient:
importance: Undecided → High
milestone: none → 0.6.4
importance: High → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-muranoclient (master)

Reviewed: https://review.openstack.org/218716
Committed: https://git.openstack.org/cgit/openstack/python-muranoclient/commit/?id=6e9f436e5370ee3ec850a4918f0b955338220833
Submitter: Jenkins
Branch: master

commit 6e9f436e5370ee3ec850a4918f0b955338220833
Author: xiangxinyong <email address hidden>
Date: Mon Aug 31 11:57:09 2015 +0800

    Fix the reversed incoming parameters of assertEqual

    For example.
    self.assertEqual(self.client.packages.create.call_count, 2)
    According the definition of assertEqual as below, it is reversed.
    def assertEqual(self, expected, observed, message=''):
      :param expected: The expected value.
      :param observed: The observed value.
      :param message: An optional message to include in the error

    Change-Id: If8a3531745fef44ef2dabaca64811ba26c4b861b
    Closes-Bug: #1490370

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