Fix py2 vs py3 dict keys comparison in functional test
In just added functional test there is a bug in dict keys comparison. In python2 the dict keys are dumped to list that is unordered. This makes random gate failures. In py3 its dumped into dict_keys object that doesn't need to be sorted. Change-Id: I3aa7927b2eb0e9dd34935107835aa677fbcd1924
This commit is contained in:
parent
698fdee50d
commit
df5c32dc86
@ -296,7 +296,8 @@ class TestOctaviaOvnProviderDriver(
|
||||
for expected_status in expected_statuses:
|
||||
for updated_status in updated_statuses:
|
||||
# Find status update having equal keys
|
||||
if updated_status.keys() == expected_status.keys():
|
||||
if (sorted(updated_status.keys()) ==
|
||||
sorted(expected_status.keys())):
|
||||
val_check = []
|
||||
# Withing this status update check if all values of
|
||||
# expected keys match.
|
||||
|
Loading…
Reference in New Issue
Block a user