aboutsummaryrefslogtreecommitdiff
path: root/python/package_database_TEST.py
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2007-11-20 20:25:29 +0000
committerAvatar David Leverton <levertond@googlemail.com> 2007-11-20 20:25:29 +0000
commit6ae1d90a0cebdc74a3368af481b3d429a8d9c8f4 (patch)
tree37abf026812fe9a883edae4ea731ec36ebade956 /python/package_database_TEST.py
parentfada389df0902a4e0e975909b3d4b4e23429f4c9 (diff)
downloadpaludis-6ae1d90a0cebdc74a3368af481b3d429a8d9c8f4.tar.gz
paludis-6ae1d90a0cebdc74a3368af481b3d429a8d9c8f4.tar.xz
Make fetch_unique_qualified_package_name take a query to limit the potential results, and use it to pick out installable or installed packages when appropriate.
Diffstat (limited to 'python/package_database_TEST.py')
-rwxr-xr-xpython/package_database_TEST.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/python/package_database_TEST.py b/python/package_database_TEST.py
index a6300ae..1fba70a 100755
--- a/python/package_database_TEST.py
+++ b/python/package_database_TEST.py
@@ -42,11 +42,13 @@ class TestCase_PackageDatabase(unittest.TestCase):
def test_03_fech_unique_qpn(self):
self.get_db()
self.assertEqual(str(QualifiedPackageName("foo/bar")), str(self.db.fetch_unique_qualified_package_name("bar")))
+ self.assertEqual(str(QualifiedPackageName("foo/bar")), str(self.db.fetch_unique_qualified_package_name("bar", Query.SupportsInstallAction())))
def test_04_exceptions(self):
self.get_db()
self.assertRaises(AmbiguousPackageNameError, self.db.fetch_unique_qualified_package_name, "baz")
self.assertRaises(NoSuchPackageError, self.db.fetch_unique_qualified_package_name, "foobarbaz")
+ self.assertRaises(NoSuchPackageError, self.db.fetch_unique_qualified_package_name, "bar", Query.SupportsUninstallAction())
def test_5_query(self):
self.get_db()