aboutsummaryrefslogtreecommitdiff
path: root/tests/test_debiandistro.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2016-09-23 13:15:27 +0200
committerGuido Günther <agx@sigxcpu.org>2016-09-23 13:15:27 +0200
commit9ffc5cbb599ea3859804979f1570d17a5c0373a2 (patch)
tree8118b317885ac543c1399497bdf9643c8b887340 /tests/test_debiandistro.py
parentead569ed946d5e7414ec4c328d4d8b2a6bb3009c (diff)
parent48651cda01095017ddc5e67a2491c02a44027ab5 (diff)
Merge tag 'v0.0.12' into debian/master
whatmaps v0.0.12
Diffstat (limited to 'tests/test_debiandistro.py')
-rw-r--r--tests/test_debiandistro.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/tests/test_debiandistro.py b/tests/test_debiandistro.py
index 617005c..b976d65 100644
--- a/tests/test_debiandistro.py
+++ b/tests/test_debiandistro.py
@@ -18,20 +18,21 @@ import unittest
from mock import patch
try:
- import apt_pkg
- have_apt_pkg=True
+ import apt_pkg # noqa: F401
+ have_apt_pkg = True
except ImportError:
- have_apt_pkg=False
+ have_apt_pkg = False
try:
- import lsb_release
- have_lsb_release=True
+ import lsb_release # noqa: F401
+ have_lsb_release = True
except ImportError:
- have_lsb_release=False
+ have_lsb_release = False
from whatmaps.debiandistro import DebianDistro
from whatmaps.debianpkg import DebianPkg
+
class TestDebianDistro(unittest.TestCase):
def test_vars(self):
"""Check Debian distro vars"""
@@ -100,7 +101,7 @@ class TestDebianDistro(unittest.TestCase):
def test_filter_security_updates(self, apt_pkg_acquire, apt_pkg_init):
pkgs = {'pkg1': DebianPkg('pkg1'),
'pkg2': DebianPkg('pkg2'),
- }
+ }
with patch('apt_pkg.Cache'):
DebianDistro.filter_security_updates(pkgs)
apt_pkg_init.assert_called_once_with()