File: ignore_urllib3.patch

package info (click to toggle)
python-etcd 0.4.5-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 484 kB
  • sloc: python: 3,040; sh: 14; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (2)
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)