From deaaf8ad1aa1ecae2c5bef9768c3e647a447b647 Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Wed, 21 Oct 2015 15:38:51 +0200 Subject: [PATCH] Fix unit-test for Postgresql.controldata() --- tests/test_postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py index 83e93ec0..70446533 100644 --- a/tests/test_postgresql.py +++ b/tests/test_postgresql.py @@ -346,7 +346,7 @@ class TestPostgresql(unittest.TestCase): self.p.remove_data_directory() @patch('subprocess.check_output', MagicMock(return_value=0, side_effect=pg_controldata_string)) - @patch('subprocess.check_output', side_effect=subprocess.CalledProcessError) + @patch('subprocess.check_output', side_effect=subprocess.CalledProcessError(1, '')) @patch('subprocess.check_output', side_effect=Exception('Failed')) def test_controldata(self, check_output_call_error, check_output_generic_exception): data = self.p.controldata()