diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_debiandistro.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_debiandistro.py b/tests/test_debiandistro.py index 10586f9..99c7c91 100644 --- a/tests/test_debiandistro.py +++ b/tests/test_debiandistro.py @@ -18,6 +18,12 @@ import unittest from mock import patch +try: + import apt_pkg + have_apt_pkg=True +except ImportError: + have_apt_pkg=False + from whatmaps.debiandistro import DebianDistro from whatmaps.debianpkg import DebianPkg @@ -84,6 +90,7 @@ class TestDebianDistro(unittest.TestCase): @patch('apt_pkg.init') @patch('apt_pkg.Acquire') + @unittest.skipUnless(have_apt_pkg, "apt_pkg not installed") def test_filter_security_updates(self, apt_pkg_acquire, apt_pkg_init): pkgs = {'pkg1': DebianPkg('pkg1'), 'pkg2': DebianPkg('pkg2'), |