Use assertCountEqual instead of assertItemsEqual

This commit is contained in:
Ezio Melotti 2010-11-29 02:02:10 +00:00
parent 40b8cf528f
commit 263cbdfdfb
2 changed files with 2 additions and 2 deletions

View File

@ -357,7 +357,7 @@ boolean {0[0]} NO
L = [section for section in cf]
L.sort()
eq = self.assertEqual
elem_eq = self.assertItemsEqual
elem_eq = self.assertCountEqual
eq(L, sorted(["A", "B", self.default_section, "a"]))
eq(cf["a"].keys(), {"b"})
eq(cf["a"]["b"], "value",

View File

@ -131,7 +131,7 @@ class CgiTests(unittest.TestCase):
if isinstance(expect, dict):
# test dict interface
self.assertEqual(len(expect), len(fs))
self.assertItemsEqual(expect.keys(), fs.keys())
self.assertCountEqual(expect.keys(), fs.keys())
##self.assertEqual(norm(expect.values()), norm(fs.values()))
##self.assertEqual(norm(expect.items()), norm(fs.items()))
self.assertEqual(fs.getvalue("nonexistent field", "default"), "default")