diff options
Diffstat (limited to 'test/units/plugins/lookup')
-rw-r--r-- | test/units/plugins/lookup/test_conjur_variable.py | 6 | ||||
-rw-r--r-- | test/units/plugins/lookup/test_onepassword.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/units/plugins/lookup/test_conjur_variable.py b/test/units/plugins/lookup/test_conjur_variable.py index c2fa87c781..98890f82ab 100644 --- a/test/units/plugins/lookup/test_conjur_variable.py +++ b/test/units/plugins/lookup/test_conjur_variable.py @@ -68,7 +68,7 @@ class TestLookupModule: mock_response = MagicMock(spec_set=http_client.HTTPResponse) try: mock_response.getcode.return_value = 200 - except: + except Exception: # HTTPResponse is a Python 3 only feature. This uses a generic mock for python 2.6 mock_response = MagicMock() mock_response.getcode.return_value = 200 @@ -83,7 +83,7 @@ class TestLookupModule: mock_response = MagicMock(spec_set=http_client.HTTPResponse) try: mock_response.getcode.return_value = 200 - except: + except Exception: # HTTPResponse is a Python 3 only feature. This uses a generic mock for python 2.6 mock_response = MagicMock() mock_response.getcode.return_value = 200 @@ -99,7 +99,7 @@ class TestLookupModule: mock_response = MagicMock(spec_set=http_client.HTTPResponse) try: mock_response.getcode.return_value = code - except: + except Exception: # HTTPResponse is a Python 3 only feature. This uses a generic mock for python 2.6 mock_response = MagicMock() mock_response.getcode.return_value = code diff --git a/test/units/plugins/lookup/test_onepassword.py b/test/units/plugins/lookup/test_onepassword.py index 0f67c8bc42..5db40fb78f 100644 --- a/test/units/plugins/lookup/test_onepassword.py +++ b/test/units/plugins/lookup/test_onepassword.py @@ -218,7 +218,7 @@ class TestOnePass(unittest.TestCase): op = MockOnePass() try: op.assert_logged_in() - except: + except Exception: self.fail() def test_onepassword_logged_out(self): |