aboutsummaryrefslogtreecommitdiff
path: root/tests/test_debiandistro.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2014-07-07 14:19:43 +0200
committerGuido Günther <agx@sigxcpu.org>2014-07-11 20:02:35 +0200
commit5e9df7763328f998805b28aff874b56b67d1bd88 (patch)
treefe9eaeabf661bddd5bd6f2a5948973e147dd4e26 /tests/test_debiandistro.py
parent836bffc3f25d5752f8c72ba2c547318aea62faae (diff)
Skip lsb_release tests when module is missingv0.0.8
Diffstat (limited to 'tests/test_debiandistro.py')
-rw-r--r--tests/test_debiandistro.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_debiandistro.py b/tests/test_debiandistro.py
index b2041ff..617005c 100644
--- a/tests/test_debiandistro.py
+++ b/tests/test_debiandistro.py
@@ -23,6 +23,12 @@ try:
except ImportError:
have_apt_pkg=False
+try:
+ import lsb_release
+ have_lsb_release=True
+except ImportError:
+ have_lsb_release=False
+
from whatmaps.debiandistro import DebianDistro
from whatmaps.debianpkg import DebianPkg
@@ -90,6 +96,7 @@ class TestDebianDistro(unittest.TestCase):
@patch('apt_pkg.init')
@patch('apt_pkg.Acquire')
@unittest.skipUnless(have_apt_pkg, "apt_pkg not installed")
+ @unittest.skipUnless(have_lsb_release, "lsb_release not installed")
def test_filter_security_updates(self, apt_pkg_acquire, apt_pkg_init):
pkgs = {'pkg1': DebianPkg('pkg1'),
'pkg2': DebianPkg('pkg2'),