summaryrefslogtreecommitdiff
path: root/mox.py
diff options
context:
space:
mode:
Diffstat (limited to 'mox.py')
-rwxr-xr-xmox.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mox.py b/mox.py
index ba1e095..3f78c9e 100755
--- a/mox.py
+++ b/mox.py
@@ -441,9 +441,11 @@ class MockObject(MockAnything, object):
pass
for method in dir(class_to_mock):
- if callable(getattr(class_to_mock, method)):
+ attr = getattr(class_to_mock, method)
+ if callable(attr):
self._known_methods.add(method)
- else:
+ elif not (type(attr) is property):
+ # treating properties as class vars makes little sense.
self._known_vars.add(method)
# Set additional attributes at instantiation time; this is quicker