Reviewed: https://review.openstack.org/76453 Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=f3ec0814971112068e933e343ef7ab8986f438c3 Submitter: Jenkins Branch: master
commit f3ec0814971112068e933e343ef7ab8986f438c3 Author: KIYOHIRO ADACHI <email address hidden> Date: Wed Feb 26 15:59:14 2014 +0900
Fix order of arguments in assertEqual
Some tests used incorrect order assertEqual(observed, expected).
The correct order expected by testtools is...
def assertEqual(self, expected, observed, message=''): """Assert that 'expected' is equal to 'observed'.
:param expected: The expected value. :param observed: The observed value. :param message: An optional message to include in the error. """
The string length of the sum of the results of repr(expected) and repr(observed) is greater than 70, then, MismatchError message is changed, as below.
Ex.: raise mismatch_error MismatchError: !=: reference = '_123456789_123456789_bar' actual = '_123456789_123456789_123456789_123456789_123456789'
Change-Id: Id02ddfb2ca03df7f432cff67a7bed182cccc4924 Closes-Bug: #1259292
Reviewed: https:/ /review. openstack. org/76453 /git.openstack. org/cgit/ openstack/ python- cinderclient/ commit/ ?id=f3ec0814971 112068e933e343e f7ab8986f438c3
Committed: https:/
Submitter: Jenkins
Branch: master
commit f3ec08149711120 68e933e343ef7ab 8986f438c3
Author: KIYOHIRO ADACHI <email address hidden>
Date: Wed Feb 26 15:59:14 2014 +0900
Fix order of arguments in assertEqual
Some tests used incorrect order assertEqual( observed, expected).
The correct order expected by testtools is...
def assertEqual(self, expected, observed, message=''):
"" "Assert that 'expected' is equal to 'observed'.
:param expected: The expected value.
:param observed: The observed value.
:param message: An optional message to include in the error.
"""
The string length of the sum of the results of repr(expected) and
repr(observed) is greater than 70, then, MismatchError message is
changed, as below.
Ex.:
MismatchError: !=: 123456789_ bar' 123456789_ 123456789_ 123456789_ 123456789'
raise mismatch_error
reference = '_123456789_
actual = '_123456789_
Change-Id: Id02ddfb2ca03df 7f432cff67a7bed 182cccc4924
Closes-Bug: #1259292