Compatibility with python 3.6 (#2626)

despite being EOL the number of downloads from pypi for 3.6 is on the first place, hence we need to support it.

Fixed a couple of problems in tests:
1. pytest complains about `call` imported from mock, mock.call() is fine
2. one test of Citus intergration was broken
This commit is contained in:
Alexander Kukushkin
2023-03-29 16:39:01 +02:00
committed by GitHub
parent 786f7eba97
commit 1003af6d20
2 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ class TestCitus(BaseTestPostgresql):
self.cluster = get_cluster_initialized_with_leader()
self.cluster.workers[1] = self.cluster
@patch('time.time', Mock(side_effect=[100, 130, 160, 190, 220, 250, 280]))
@patch('time.time', Mock(side_effect=[100, 130, 160, 190, 220, 250, 280, 310]))
@patch('patroni.postgresql.citus.logger.exception', Mock(side_effect=SleepException))
@patch('patroni.postgresql.citus.logger.warning')
@patch('patroni.postgresql.citus.PgDistNode.wait', Mock())