summaryrefslogtreecommitdiff
path: root/mock.py
diff options
context:
space:
mode:
authorMichael Foord <michael@voidspace.org.uk>2011-10-29 21:29:02 +0100
committerMichael Foord <michael@voidspace.org.uk>2011-10-29 21:29:02 +0100
commit2da69d6b5c0a5eea7019a6e10de6c8d4bf57322a (patch)
tree99cc15cda52ee6ad5a8e8b389bec1d4d5a47f770 /mock.py
parent65db4a238620c5eba4cc282cbeddd657b363d958 (diff)
downloadmock-2da69d6b5c0a5eea7019a6e10de6c8d4bf57322a.tar.gz
Remove unused code for setting MagicProxy on instances
Diffstat (limited to 'mock.py')
-rw-r--r--mock.py5
1 files changed, 0 insertions, 5 deletions
diff --git a/mock.py b/mock.py
index 8500e4e..7a2449c 100644
--- a/mock.py
+++ b/mock.py
@@ -788,10 +788,6 @@ class NonCallableMock(Base):
if self._mock_methods is not None and name not in self._mock_methods:
raise AttributeError("Mock object has no attribute '%s'" % name)
- if isinstance(value, MagicProxy):
- setattr(type(self), name, value)
- return
-
if not _is_instance_mock(value):
setattr(type(self), name, _get_method(name, value))
original = value
@@ -1836,7 +1832,6 @@ class MagicMock(MagicMixin, Mock):
class MagicProxy(object):
- __slots__ = ['name', 'parent']
def __init__(self, name, parent):
self.name = name
self.parent = parent