@@ -19,7 +19,7 @@ tool that can extract the string representation of a python objet. This is what
19
19
20
20
``` python
21
21
from unittest.mock import patch, MagicMock
22
- from coveo_testing.mocks import ref
22
+ from coveo_ref import ref
23
23
from mymodule.clients import APIClient
24
24
25
25
@patch (* ref(APIClient._do_request))
@@ -64,7 +64,7 @@ But with `ref`, you specify the context separately:
64
64
65
65
``` python
66
66
from unittest.mock import patch, MagicMock
67
- from coveo_testing.mocks import ref
67
+ from coveo_ref import ref
68
68
from mymodule.clients import get_api_client
69
69
from mymodule.tasks import process
70
70
@@ -100,7 +100,7 @@ The test:
100
100
101
101
``` python
102
102
from unittest.mock import patch, MagicMock
103
- from coveo_testing.mocks import ref
103
+ from coveo_ref import ref
104
104
from mymodule.clients import get_api_client
105
105
from mymodule.tasks import process
106
106
@@ -132,7 +132,7 @@ can unpack to `patch.object()`:
132
132
133
133
``` python
134
134
from unittest.mock import patch
135
- from coveo_testing.mocks import ref
135
+ from coveo_ref import ref
136
136
from mymodule.clients import APIClient
137
137
138
138
def test () -> None :
@@ -155,7 +155,7 @@ For instance, consider this test:
155
155
``` python
156
156
from http.client import HTTPResponse
157
157
from unittest.mock import patch, MagicMock
158
- from coveo_testing.mocks import ref
158
+ from coveo_ref import ref
159
159
160
160
from mymodule.tasks import process
161
161
@@ -226,7 +226,7 @@ So you _know_ this works globally, because no one will (should?) import the priv
226
226
227
227
``` python
228
228
from unittest.mock import patch, MagicMock
229
- from coveo_testing.mocks import ref
229
+ from coveo_ref import ref
230
230
231
231
from mymodule.tasks import process
232
232
from mymodule.clients import _get_api_client
@@ -259,7 +259,7 @@ The test, showing 3 different methods that work:
259
259
260
260
``` python
261
261
from unittest.mock import patch, MagicMock
262
- from coveo_testing.mocks import ref
262
+ from coveo_ref import ref
263
263
264
264
from mymodule.clients import get_api_client
265
265
from mymodule.tasks import process
@@ -296,7 +296,7 @@ Sometimes, the test file _is_ the context. When that happens, just pass `__name_
296
296
297
297
``` python
298
298
from unittest.mock import patch
299
- from coveo_testing.mocks import ref
299
+ from coveo_ref import ref
300
300
from mymodule.clients import get_api_client, APIClient
301
301
302
302
def _prepare_test () -> APIClient:
@@ -377,7 +377,7 @@ class MyClass:
377
377
378
378
``` python
379
379
from unittest.mock import PropertyMock, patch, MagicMock
380
- from coveo_testing.mocks import ref
380
+ from coveo_ref import ref
381
381
382
382
from mymodule import MyClass
383
383
@@ -406,7 +406,7 @@ For this particular scenario, the workaround is to provide the instance as the c
406
406
407
407
``` python
408
408
from unittest.mock import patch
409
- from coveo_testing.mocks import ref
409
+ from coveo_ref import ref
410
410
411
411
412
412
class MyClass :
0 commit comments