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)
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)