Created
September 27, 2016 13:20
-
-
Save sivabudh/0cb53bfbcd3b96a43a3b40fd447a526e to your computer and use it in GitHub Desktop.
A fucking useless test
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
def foo(x): | |
y = _bar(x) | |
z = _baz(x, y) | |
x.frob = bling | |
return x | |
def test_foo(): | |
with mock.patch('path.to.foopy._bar', return_value=1) as bar, mock.patch('path.to.foopy._baz', return_value=2) as baz: | |
zip = foo(5) | |
assert bar.called_once_with(5) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment