aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-09 01:52:46 +0200
committerJauhien Piatlicki (jauhien) <piatlicki@gmail.com>2013-07-09 01:52:46 +0200
commit5cec193a5271ef3ca4577390f7aa242df5eb71ea (patch)
tree101e78db1a8f977ce573120fc0ce9e2a70a71e07 /tests
parentg_sorcery/g_sorcery: backend selection (diff)
downloadg-sorcery-5cec193a5271ef3ca4577390f7aa242df5eb71ea.tar.gz
g-sorcery-5cec193a5271ef3ca4577390f7aa242df5eb71ea.tar.bz2
g-sorcery-5cec193a5271ef3ca4577390f7aa242df5eb71ea.zip
tests/test_package_db: sort list
Diffstat (limited to 'tests')
-rw-r--r--tests/test_package_db.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_package_db.py b/tests/test_package_db.py
index d491152..b2d51a2 100644
--- a/tests/test_package_db.py
+++ b/tests/test_package_db.py
@@ -72,7 +72,7 @@ class TestDummyDB(BaseTest):
categories = list(set([x.category for x in self.packages]))
for category in categories:
package_names = list(set([x.name for x in self.packages if x.category == category]))
- self.assertEqual(package_names, db.list_package_names(category))
+ self.assertEqual(package_names.sort(), db.list_package_names(category).sort())
self.assertRaises(exceptions.InvalidKeyError, db.list_package_names, 'no_such_category')
def test_list_package_versions(self):
@@ -82,8 +82,9 @@ class TestDummyDB(BaseTest):
for category in categories:
package_names = list(set([x.name for x in self.packages if x.category == category]))
for name in package_names:
- versions = [x.version for x in self.packages if x.category == category and x.name == name]
- self.assertEqual(versions, db.list_package_versions(category, name))
+ versions = [x.version for x in self.packages
+ if x.category == category and x.name == name]
+ self.assertEqual(versions.sort(), db.list_package_versions(category, name).sort())
self.assertRaises(exceptions.InvalidKeyError, db.list_package_versions, 'no_such_category', 'a')
self.assertRaises(exceptions.InvalidKeyError, db.list_package_versions,
categories[0], 'no_such_package')