Created
February 10, 2018 22:14
-
-
Save colinfwren/5d7bbb8fd1cc39801f27246629d2d971 to your computer and use it in GitHub Desktop.
Patching Odoo Registries - Mocks
This file contains hidden or 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
class TestTheFoo(TransactionCase): | |
calls_to_mock = [] | |
def setUp(): | |
super(TestTheFoo, self).setUp() | |
self.calls_to_mock = [] | |
def res_user_read_mock(*args, **kwargs): | |
self.calls_to_mock.append({'args': args, 'kwargs': kwargs}) | |
if len(self.calls_to_mock) > 2 | |
return 'Some foo' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment