We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e5e067 commit e1b0ae7Copy full SHA for e1b0ae7
docs/pages/principles/testing.md
@@ -360,7 +360,8 @@ namespace into an imported dependency's namespace, like so:
360
```python
361
def test_func(mocker):
362
mock_sum = mocker.patch(
363
- "project.lib.np.sum"
+ "project.lib.np.sum",
364
+ autospec=True,
365
) # you'll need to patch the alias'd namespace
366
...
367
```
@@ -376,7 +377,7 @@ file-under-test:
376
377
378
379
- np_sum = mocker.patch("project.lib.np_sum")
380
+ np_sum = mocker.patch("project.lib.np_sum", autospec=True)
381
382
383
0 commit comments