Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import mock
- def foo(a):
- print('Foo ran %s' % a)
- with mock.patch('__main__.foo', side_effect=foo) as f:
- f(123)
- print(f.call_args_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement