Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
def test_partial_mock(self):
with mock.patch.object(Rick, 'assign', return_value=333):
rick = Rick(111)
self.assertEqual(rick.assign(), 333)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment