Dirk Mueller
c806c7d6ee
* Add a release note for the RLock * Allow passing json\_encoder to mocking * Improvements to Type Hints * Lint fix for long line exception * Shorten line length of comments * Workaround for python2.7 not supporting lock timeout * Comments to explain reentrant behaviour * Change to use RLock and set a timeout to prevent infinite deadlocks * Update homepage/doc URLs of requests library * Add comment for pytest late loading feature * pytest plugin should lazy-load requests\_mock * Add test for threaded race condition * Use threading.Lock() to prevent race conditions around monkeypatching of get\_adapter() * add GitHub URL for PyPi * Add reset methods on the Mocker class type * Avoid using distutils to check pytest version * YAML quoting * Support Python 3.10 * Minor changes to code snippet example * Fix DeprecationWarnings in setup.cfg keys * a few minor fixes and proposed changes to documentation files * Improve response-related param type hints * Explicitly indicate start of keyword-only args * Fix failing pytest OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-requests-mock?expand=0&rev=49
17 lines
392 B
Diff
17 lines
392 B
Diff
Index: requests-mock-1.10.0/tests/test_mocker.py
|
|
===================================================================
|
|
--- requests-mock-1.10.0.orig/tests/test_mocker.py
|
|
+++ requests-mock-1.10.0/tests/test_mocker.py
|
|
@@ -13,7 +13,10 @@
|
|
import json
|
|
import pickle
|
|
|
|
-import mock
|
|
+try:
|
|
+ from unittest import mock
|
|
+except ImportError:
|
|
+ import mock
|
|
import requests
|
|
|
|
import requests_mock
|