From 963efa4bebcdf8a73db0fac838cddd57492e7f06 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Tue, 22 Apr 2014 13:06:53 +0200 Subject: Use 'in' instead of 'has_key' which doesn't exit in Python3 --- tests/test_debiandistro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_debiandistro.py b/tests/test_debiandistro.py index a166aa8..771d1b6 100644 --- a/tests/test_debiandistro.py +++ b/tests/test_debiandistro.py @@ -85,7 +85,7 @@ class TestDebianDistro(unittest.TestCase): with patch('sys.stdin', new_callable=AptPipelineMock): pkgs = DebianDistro.read_apt_pipeline() self.assertEqual(len(pkgs), 1) - self.assertTrue(pkgs.has_key('pkg1')) + self.assertIn('pkg1', pkgs) self.assertTrue(pkgs['pkg1'].name, 'pkg1') @patch('apt_pkg.init') -- cgit v1.2.3