diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-08-05 14:43:14 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-08-05 14:43:14 +0200 |
commit | 95620b53bcdf68843cd210306bb7228bfee3239c (patch) | |
tree | 71e1578814515cdc67cfd9fff230d98d4b5fd99f /tests/test_debiandistro.py | |
parent | a0aa1dd751453a3557f16912cc5cfe1225eb3253 (diff) | |
parent | 20df31b862f3fbb274a4bb4952a84a53b73238a0 (diff) |
Merge tag 'debian/0.0.8-2' into bpo/wheezy
whatmaps Debian release 0.0.8-2
Diffstat (limited to 'tests/test_debiandistro.py')
-rw-r--r-- | tests/test_debiandistro.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_debiandistro.py b/tests/test_debiandistro.py index c01efd8..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,11 +96,12 @@ 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'), } - with patch('apt_pkg.Cache') as mock: + with patch('apt_pkg.Cache'): DebianDistro.filter_security_updates(pkgs) apt_pkg_init.assert_called_once_with() apt_pkg_acquire.assert_called_once_with() |