Use assertCountEqual instead of assertItemsEqual
The assertItemsEqual method has been removed in Python 3.3 [1] but it was kept alive by unittest2, imported by testtools. For better compatibility, change to assertCountEqual. [1] https://bugs.python.org/issue17866 Change-Id: Iea76915f25eb2e505750d509bdd06758afe324de (cherry picked from commit b5603cc45cb42d6406d8227b18ac92aac39afccc)
This commit is contained in:
parent
900a1aa78e
commit
8636b3dbb5
@ -364,9 +364,9 @@ class TestListVnfLcmOp(TestVnfLcm):
|
||||
expected_data.append(vnflcm_op_occs_fakes.get_vnflcm_op_occ_data(
|
||||
vnflcm_op_occ_obj_idx, columns=columns))
|
||||
|
||||
self.assertItemsEqual(_get_columns_vnflcm_op_occs(action='list'),
|
||||
self.assertCountEqual(_get_columns_vnflcm_op_occs(action='list'),
|
||||
actual_columns)
|
||||
self.assertItemsEqual(expected_data, list(data))
|
||||
self.assertCountEqual(expected_data, list(data))
|
||||
|
||||
def test_take_action_with_filter(self):
|
||||
vnflcm_op_occs_obj = vnflcm_op_occs_fakes.create_vnflcm_op_occs(
|
||||
@ -392,7 +392,7 @@ class TestListVnfLcmOp(TestVnfLcm):
|
||||
expected_data.append(vnflcm_op_occs_fakes.get_vnflcm_op_occ_data(
|
||||
vnflcm_op_occ_obj_idx, columns=columns))
|
||||
|
||||
self.assertItemsEqual(_get_columns_vnflcm_op_occs(action='list'),
|
||||
self.assertCountEqual(_get_columns_vnflcm_op_occs(action='list'),
|
||||
actual_columns)
|
||||
self.assertListItemsEqual(expected_data, list(data))
|
||||
|
||||
@ -459,7 +459,7 @@ class TestShowVnfLcmOp(TestVnfLcm):
|
||||
|
||||
columns, data = (self.show_vnf_lcm_op_occs.take_action(parsed_args))
|
||||
|
||||
self.assertItemsEqual(_get_columns_vnflcm_op_occs(),
|
||||
self.assertCountEqual(_get_columns_vnflcm_op_occs(),
|
||||
columns)
|
||||
|
||||
def test_take_action_vnf_lcm_op_occ_id_not_found(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user