summaryrefslogtreecommitdiff
path: root/mock/mock.py
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2019-08-29 01:27:42 -0700
committerChris Withers <chris@withers.org>2020-01-24 18:39:08 +0000
commit20fce5db496c7864341665233e0f73d2df1836c8 (patch)
tree7abfb895c4b48bc3c7742735f1244875a0a6c9b7 /mock/mock.py
parent202ff787f9c423ece9f20994f7798c2738add362 (diff)
downloadmock-20fce5db496c7864341665233e0f73d2df1836c8.tar.gz
bpo-36743: __get__ is sometimes called without the owner argument (#12992)
Backports: 0dac68f1e593c11612ed54af9edb865d398f3b05 Signed-off-by: Chris Withers <chris@withers.org>
Diffstat (limited to 'mock/mock.py')
-rw-r--r--mock/mock.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/mock/mock.py b/mock/mock.py
index 953ca84..adbd87d 100644
--- a/mock/mock.py
+++ b/mock/mock.py
@@ -2823,7 +2823,7 @@ class PropertyMock(Mock):
def _get_child_mock(self, **kwargs):
return MagicMock(**kwargs)
- def __get__(self, obj, obj_type):
+ def __get__(self, obj, obj_type=None):
return self()
def __set__(self, obj, val):
self(val)