Advertisement
Guest User

Untitled

a guest
Oct 2nd, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.15 KB | None | 0 0
  1. import mock
  2.  
  3. def foo(a):
  4. print('Foo ran %s' % a)
  5.  
  6. with mock.patch('__main__.foo', side_effect=foo) as f:
  7. f(123)
  8. print(f.call_args_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement