diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_apt_cache.py | 6 | ||||
| -rw-r--r-- | tests/test_debfile.py | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 0b33a2e3..cfb3ab99 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -59,13 +59,13 @@ class TestAptCache(unittest.TestCase): self.assertTrue(len(l) > 0) self.assertTrue("postfix" in [p.name for p in l]) # this is a not virtual (transitional) package provided by another - l = cache.get_providing_packages("scrollkeeper") + l = cache.get_providing_packages("git-core") self.assertEqual(l, []) # now inlcude nonvirtual packages in the search (rarian-compat # provides scrollkeeper) - l = cache.get_providing_packages("scrollkeeper", + l = cache.get_providing_packages("git-core", include_nonvirtual=True) - self.assertTrue(len(l), 1) + self.assertEqual([p.name for p in l], ["git"]) self.assertTrue("mail-transport-agent" in cache["postfix"].candidate.provides) def test_low_level_pkg_provides(self): diff --git a/tests/test_debfile.py b/tests/test_debfile.py index 759639c4..712c4958 100644 --- a/tests/test_debfile.py +++ b/tests/test_debfile.py @@ -100,7 +100,17 @@ class TestDebfilee(unittest.TestCase): deb.open(os.path.join("data", "test_debs", "gdebi-test12.deb")) content = deb.data_content("usr/bin/binary") self.assertTrue(content.startswith("Automatically converted to printable ascii:\n\x7fELF ")) - + # control file + needle = """Package: gdebi-test12 +Version: 1.0 +Architecture: all +Description: testpackage for gdebi - contains usr/bin/binary for file reading + This tests the binary file reading for debfile.py +""" + content = deb.control_content("./control") + self.assertEqual(content, needle) + content = deb.control_content("control") + self.assertEqual(content, needle) if __name__ == "__main__": #logging.basicConfig(level=logging.DEBUG) |
