diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-31 17:19:27 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-08-31 17:19:27 +0200 |
| commit | 33bbf9482fe486aab915768fc74609d303c1e1f9 (patch) | |
| tree | 271c9fe336d7ff6ac8d984f61e3eb873fbb383df /tests/test_apt_cache.py | |
| parent | e381c072e22a8117f1310997a328dc0d4ffeab8d (diff) | |
| download | python-apt-33bbf9482fe486aab915768fc74609d303c1e1f9.tar.gz | |
tests/test_apt_cache.py: add test for provides_list
Diffstat (limited to 'tests/test_apt_cache.py')
| -rw-r--r-- | tests/test_apt_cache.py | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 44b95cab..d6a2cbd4 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -62,7 +62,20 @@ class TestAptCache(unittest.TestCase): include_nonvirtual=True) self.assertTrue(len(l), 1) self.assertTrue("mail-transport-agent" in cache["postfix"].candidate.provides) - + + def test_low_level_pkg_provides(self): + # low level cache provides list of the pkg + cache = apt_pkg.Cache() + l = cache["mail-transport-agent"].provides_list + # arbitrary number, just needs to be higher enough + self.assertTrue(len(l), 5) + for (providesname, providesver, version) in l: + self.assertEqual(providesname, "mail-transport-agent") + if version.parent_pkg.name == "postfix": + break + else: + self.assertNotReached() + def test_dpkg_journal_dirty(self): # backup old value |
