Minor bug of _assert_multiple_items function

When the assert fails, bug in the logging overrides the real exception:
  File "/home/mcdoker18/opensource/mistral/mistral/tests/unit/base.py",
  line 162, in _assert_multiple_items
  ...
  File "/usr/lib64/python3.6/logging/__init__.py", line 338, in
    getMessage
    msg = msg % self.args
TypeError: not enough arguments for format string

Change-Id: Icd95ff9416de1e7f97a4d5bd242df4d1537ff7b0
Signed-off-by: Vitalii Solodilov <mcdkr@yandex.ru>
This commit is contained in:
Vitalii Solodilov 2018-09-03 10:41:03 +04:00
parent 4a9ceaf47d
commit bd198eacd9
1 changed files with 2 additions and 2 deletions

View File

@ -158,8 +158,8 @@ class BaseTest(base.BaseTestCase):
found = len(filtered_items)
if found != count:
LOG.info("[failed test ctx] items=%s, expected_props=%s", (str(
items), props))
LOG.info("[failed test ctx] items=%s, expected_props=%s", str(
items), props)
self.fail("Wrong number of items found [props=%s, "
"expected=%s, found=%s]" % (props, count, found))