MCPcopy
hub / github.com/timbrel/GitSavvy / _get_mock

Function _get_mock

tests/mockito/mockito.py:87–92  ·  view source on GitHub ↗
(obj, strict=True)

Source from the content-addressed store, hash-verified

85 return verification.Times(times)
86
87def _get_mock(obj, strict=True):
88 theMock = mock_registry.mock_for(obj)
89 if theMock is None:
90 theMock = Mock(obj, strict=strict, spec=obj)
91 mock_registry.register(obj, theMock)
92 return theMock
93
94def _get_mock_or_raise(obj):
95 theMock = mock_registry.mock_for(obj)

Callers 4

whenFunction · 0.85
when2Function · 0.85
patchFunction · 0.85
expectFunction · 0.85

Calls 3

MockClass · 0.85
mock_forMethod · 0.80
registerMethod · 0.80

Tested by

no test coverage detected