Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@flopezluis
Last active December 14, 2015 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flopezluis/5163129 to your computer and use it in GitHub Desktop.
Save flopezluis/5163129 to your computer and use it in GitHub Desktop.
Small example the how I'm using pytest
@pytest.fixture()
def foo_client(monkeypatch):
def authenticate():
pass
monkeypatch.setattr(FooClient, "authenticate", authenticate)
return FooClient("token", "secret")
def test_add_data(foo_client):
foo_client.add_data(["shuttlecloud.com"])
assert "shuttlecloud.com" in foo_client.get_data()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment