Do not try to run postgres -D during unit tests.

This commit is contained in:
Oleksii Kliukin
2015-10-12 17:06:13 +02:00
parent d7988384d3
commit 46f4788c28
+1
View File
@@ -221,6 +221,7 @@ class TestPostgresql(unittest.TestCase):
@patch('patroni.postgresql.Postgresql.rewind', return_value=False)
@patch('patroni.postgresql.Postgresql.remove_data_directory', MagicMock(return_value=True))
@patch('patroni.postgresql.Postgresql.single_user_mode', MagicMock(return_value=1))
def test_follow_the_leader(self, mock_pg_rewind):
self.p.demote()
self.p.follow_the_leader(None)