mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Compatibility with some old modules (#2514)
- old click differently handles argument names - old pytest doesn't like `from mock import call` Bump version and update release notes. Close: https://github.com/zalando/patroni/issues/2508 Close: https://github.com/zalando/patroni/issues/2512
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
import base64
|
||||
import datetime
|
||||
import json
|
||||
import mock
|
||||
import socket
|
||||
import time
|
||||
import unittest
|
||||
|
||||
from mock import call, Mock, PropertyMock, mock_open, patch
|
||||
from mock import Mock, PropertyMock, mock_open, patch
|
||||
from patroni.dcs.kubernetes import k8s_client, k8s_config, K8sConfig, K8sConnectionFailed,\
|
||||
K8sException, K8sObject, Kubernetes, KubernetesError, KubernetesRetriableException,\
|
||||
Retry, RetryFailedError, SERVICE_HOST_ENV_NAME, SERVICE_PORT_ENV_NAME
|
||||
@@ -134,7 +135,7 @@ class TestK8sConfig(unittest.TestCase):
|
||||
mock_atexit.assert_called_once()
|
||||
mock_remove.side_effect = OSError
|
||||
mock_atexit.call_args[0][0]() # call _cleanup_temp_files
|
||||
mock_remove.assert_has_calls([call('1.tmp'), call('2.tmp')])
|
||||
mock_remove.assert_has_calls([mock.call('1.tmp'), mock.call('2.tmp')])
|
||||
|
||||
|
||||
@patch('urllib3.PoolManager.request')
|
||||
|
||||
Reference in New Issue
Block a user