1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
From: s3v <c0llapsed@yahoo.it>
Last-Update: 2024-11-06
Description: Work around remaining build error
--- a/src/etcd/tests/unit/test_request.py
+++ b/src/etcd/tests/unit/test_request.py
@@ -79,13 +79,12 @@
If a test should be run only in this class, please override the method there.
"""
- @mock.patch('urllib3.request.RequestMethods.request')
- def test_machines(self, mocker):
+ def test_machines(self):
""" Can request machines """
data = ['http://127.0.0.1:4001',
'http://127.0.0.1:4002', 'http://127.0.0.1:4003']
d = ','.join(data)
- mocker.return_value = self._prepare_response(200, d)
+ self.client.http.request = mock.MagicMock(return_value=self._prepare_response(200, d))
self.assertEqual(data, self.client.machines)
@mock.patch('etcd.Client.machines', new_callable=mock.PropertyMock)
|