Last active
December 6, 2018 20:22
-
-
Save codelahoma/e70e9cbbd5e5c72ee897c9485e5ac02b to your computer and use it in GitHub Desktop.
how to check that a method wasn't called on a fudge mock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_was_called = False | |
def fake_get(): | |
nonlocal get_was_called | |
get_was_called = True | |
mock_equip_obj.provides('get').calls(fake_get) | |
# interaction that shouldn't call `get` | |
self.assertFalse(get_was_called) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment