Home
last modified time | relevance | path

Searched refs:PropertyMock (Results 1 – 3 of 3) sorted by relevance

/third_party/python/Lib/unittest/test/testmock/
Dtesthelpers.py8 Mock, ANY, _CallList, patch, PropertyMock, _callable
1063 p = patch('%s.SomeClass.one' % __name__, new_callable=PropertyMock)
1082 p = PropertyMock()
1088 self.assertNotIsInstance(returned, PropertyMock)
/third_party/python/Doc/library/
Dunittest.mock.rst208 from unittest.mock import patch, call, Mock, MagicMock, PropertyMock, AsyncMock
820 .. class:: PropertyMock(*args, **kwargs)
823 :class:`PropertyMock` provides :meth:`__get__` and :meth:`__set__` methods
826 Fetching a :class:`PropertyMock` instance from an object calls the mock, with
837 >>> with patch('__main__.Foo.foo', new_callable=PropertyMock) as mock_foo:
848 :class:`PropertyMock` to a mock object. Instead you can attach it to the mock type
852 >>> p = PropertyMock(return_value=3)
/third_party/python/Lib/unittest/
Dmock.py2893 class PropertyMock(Mock): class