diff --git a/vitrage_tempest_plugin/tests/common/cinder_utils.py b/vitrage_tempest_plugin/tests/common/cinder_utils.py index 9228a84..1434b59 100644 --- a/vitrage_tempest_plugin/tests/common/cinder_utils.py +++ b/vitrage_tempest_plugin/tests/common/cinder_utils.py @@ -47,6 +47,6 @@ def _check_num_volumes(num_volumes=0, state=''): if len(TempestClients.cinder().volumes.list()) != num_volumes: return False - return all(volume.__dict__['status'].upper() == state.upper() and - len(volume.__dict__['attachments']) == 1 + return all(vars(volume)['status'].upper() == state.upper() and + len(vars(volume)['attachments']) == 1 for volume in TempestClients.cinder().volumes.list()) diff --git a/vitrage_tempest_plugin/tests/common/general_utils.py b/vitrage_tempest_plugin/tests/common/general_utils.py index 9793b97..42c2cb3 100644 --- a/vitrage_tempest_plugin/tests/common/general_utils.py +++ b/vitrage_tempest_plugin/tests/common/general_utils.py @@ -32,7 +32,7 @@ def is_subset(subset, full): return True full_dict = full if type(full) is not dict: - full_dict = full.__dict__ + full_dict = vars(full) return six.viewitems(subset) <= six.viewitems(full_dict)