summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/testmock/support.py
diff options
context:
space:
mode:
authorXtreak <tir.karthi@gmail.com>2019-02-24 18:54:49 (GMT)
committerChris Withers <chris@withers.org>2019-02-24 18:54:49 (GMT)
commita875ea58b29fbf510f9790ae1653eeaa47dc0de8 (patch)
tree076c625afd240521c200df9b98485846f32687a4 /Lib/unittest/test/testmock/support.py
parentaeca373b339e0ea9739536ce6b43bd90f3b89873 (diff)
downloadcpython-a875ea58b29fbf510f9790ae1653eeaa47dc0de8.zip
cpython-a875ea58b29fbf510f9790ae1653eeaa47dc0de8.tar.gz
cpython-a875ea58b29fbf510f9790ae1653eeaa47dc0de8.tar.bz2
bpo-35512: Resolve string target to patch.dict decorator during function call GH#12000
* Resolve string target to patch.dict during function call * Add NEWS entry * Remove unneeded call * Restore original value for support.target and refactor assertions * Add extra assertion to verify unpatched dict
Diffstat (limited to 'Lib/unittest/test/testmock/support.py')
-rw-r--r--Lib/unittest/test/testmock/support.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/support.py b/Lib/unittest/test/testmock/support.py
index c7ad20b..f146be2 100644
--- a/Lib/unittest/test/testmock/support.py
+++ b/Lib/unittest/test/testmock/support.py
@@ -1,3 +1,6 @@
+target = {'foo': 'FOO'}
+
+
def is_instance(obj, klass):
"""Version of is_instance that doesn't access __class__"""
return issubclass(type(obj), klass)