diff options
Diffstat (limited to 'tests/testhelpers.py')
-rw-r--r-- | tests/testhelpers.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/testhelpers.py b/tests/testhelpers.py index e80321d..b92f511 100644 --- a/tests/testhelpers.py +++ b/tests/testhelpers.py @@ -881,5 +881,16 @@ class TestCallList(unittest2.TestCase): p.stop() + def test_propertymock_returnvalue(self): + m = MagicMock() + p = PropertyMock() + type(m).foo = p + + returned = m.foo + p.assert_called_once_with() + self.assertIsInstance(returned, MagicMock) + self.assertNotIsInstance(returned, PropertyMock) + + if __name__ == '__main__': unittest2.main() |