diff --git a/diskimage_builder/block_device/tests/test_config.py b/diskimage_builder/block_device/tests/test_config.py index 42675183..371df211 100644 --- a/diskimage_builder/block_device/tests/test_config.py +++ b/diskimage_builder/block_device/tests/test_config.py @@ -65,21 +65,21 @@ class TestConfigParsing(TestConfig): def test_graph(self): graph = self.load_config_file('simple_graph.yaml') parsed_graph = config_tree_to_graph(graph) - self.assertItemsEqual(parsed_graph, graph) + self.assertCountEqual(parsed_graph, graph) # equivalence of simple tree to graph def test_simple_tree(self): tree = self.load_config_file('simple_tree.yaml') graph = self.load_config_file('simple_graph.yaml') parsed_graph = config_tree_to_graph(tree) - self.assertItemsEqual(parsed_graph, graph) + self.assertCountEqual(parsed_graph, graph) # equivalence of a deeper tree to graph def test_deep_tree(self): tree = self.load_config_file('deep_tree.yaml') graph = self.load_config_file('deep_graph.yaml') parsed_graph = config_tree_to_graph(tree) - self.assertItemsEqual(parsed_graph, graph) + self.assertCountEqual(parsed_graph, graph) # equivalence of a complicated multi-partition tree to graph def test_multipart_tree(self): @@ -87,7 +87,7 @@ class TestConfigParsing(TestConfig): graph = self.load_config_file('multiple_partitions_graph.yaml') parsed_graph = config_tree_to_graph(tree) logger.debug(parsed_graph) - self.assertItemsEqual(parsed_graph, graph) + self.assertCountEqual(parsed_graph, graph) class TestCreateGraph(TestGraphGeneration): diff --git a/diskimage_builder/block_device/tests/test_lvm.py b/diskimage_builder/block_device/tests/test_lvm.py index 757453af..4f425350 100644 --- a/diskimage_builder/block_device/tests/test_lvm.py +++ b/diskimage_builder/block_device/tests/test_lvm.py @@ -38,7 +38,7 @@ class TestLVM(tc.TestGraphGeneration): tree = self.load_config_file('lvm_tree.yaml') graph = self.load_config_file('lvm_graph.yaml') parsed_graph = config_tree_to_graph(tree) - self.assertItemsEqual(parsed_graph, graph) + self.assertCountEqual(parsed_graph, graph) def test_lvm_invalid_config(self): # test some invalid config paths diff --git a/diskimage_builder/tests/test_elementdeps.py b/diskimage_builder/tests/test_elementdeps.py index d4ac1748..6838af6a 100644 --- a/diskimage_builder/tests/test_elementdeps.py +++ b/diskimage_builder/tests/test_elementdeps.py @@ -109,7 +109,7 @@ class TestElementDeps(testtools.TestCase): def test_non_transitive_deps(self): result = element_dependencies.get_elements(['requires-foo'], self.element_dirs) - self.assertItemsEqual([self._e('foo'), self._e('requires-foo')], + self.assertCountEqual([self._e('foo'), self._e('requires-foo')], result) def test_missing_deps(self): @@ -131,7 +131,7 @@ class TestElementDeps(testtools.TestCase): result = element_dependencies.get_elements( ['requires-requires-foo'], self.element_dirs) - self.assertItemsEqual([self._e('requires-requires-foo'), + self.assertCountEqual([self._e('requires-requires-foo'), self._e('requires-foo'), self._e('foo')], result) @@ -142,20 +142,20 @@ class TestElementDeps(testtools.TestCase): def test_self(self): result = element_dependencies.get_elements(['self', 'foo'], self.element_dirs) - self.assertItemsEqual([self._e('self'), + self.assertCountEqual([self._e('self'), self._e('foo')], result) def test_circular(self): result = element_dependencies.get_elements(['circular1'], self.element_dirs) - self.assertItemsEqual([self._e('circular1'), + self.assertCountEqual([self._e('circular1'), self._e('circular2')], result) def test_provide(self): result = element_dependencies.get_elements( ['provides_virtual', 'requires_virtual'], self.element_dirs) - self.assertItemsEqual([self._e('requires_virtual'), + self.assertCountEqual([self._e('requires_virtual'), self._e('provides_virtual')], result) def test_provide_conflict(self): @@ -168,7 +168,7 @@ class TestElementDeps(testtools.TestCase): result = element_dependencies.get_elements( ['requires_new_virtual', 'provides_new_virtual'], self.element_dirs) - self.assertItemsEqual( + self.assertCountEqual( [self._e('requires_new_virtual'), self._e('provides_new_virtual')], result) @@ -202,7 +202,7 @@ class TestElementDeps(testtools.TestCase): # not the base dir result = element_dependencies.get_elements(['override_element', 'foo'], self.element_dirs) - self.assertItemsEqual([self._e('foo'), + self.assertCountEqual([self._e('foo'), self._eo('override_element')], result) @@ -210,7 +210,7 @@ class TestElementDeps(testtools.TestCase): # test the deprecated expand_dependencies call result = element_dependencies.expand_dependencies( ['foo', 'requires-foo'], self.element_dirs) - self.assertItemsEqual(['foo', 'requires-foo'], result) + self.assertCountEqual(['foo', 'requires-foo'], result) def test_output_sanity(self): # very basic output sanity test