Skip to content

Instantly share code, notes, and snippets.

@Kalimaha
Last active December 10, 2017 04:09
Show Gist options
  • Select an option

  • Save Kalimaha/b8f343984ea86b38563d7519fb4ae160 to your computer and use it in GitHub Desktop.

Select an option

Save Kalimaha/b8f343984ea86b38563d7519fb4ae160 to your computer and use it in GitHub Desktop.
@given('steaks are available')
@upon_receiving('a request for a well-done steak')
@with_request({'method': 'POST', 'path': '/steaks/', 'body': {'cooking': 'well-done'}})
@will_respond_with({'status': 422, 'body': {'reason': 'we do not serve well-done steaks'}})
def test_steak(self):
response = steak('well-done')
assert response.status_code == 422
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment