Fail in test_titles of ironic-specs

When run tox to test, the error below appears:
...
dict(expect.items() + allowed.items())]

TypeError: unsupported operand type(s) for +:
'dict_items' and 'dict_items'
...

Change-Id: I54154927e08d04248301d4d29de1d88d13890c01
Closes-Bug: #1755169
This commit is contained in:
Nguyen Hai 2018-03-12 22:22:09 +09:00
parent db89b8ac97
commit 3dae485a10
1 changed files with 2 additions and 3 deletions

View File

@ -61,9 +61,8 @@ class TestTitles(testtools.TestCase):
return titles
def _check_titles(self, filename, expect, allowed, actual):
missing_sections = [x for x in expect.keys() if x not in actual.keys()]
extra_sections = [x for x in actual.keys() if x not in
dict(expect.items() + allowed.items())]
missing_sections = set(expect) - set(actual)
extra_sections = set(actual) - set(expect).union(allowed)
msgs = []
if len(missing_sections) > 0: