Last active
December 10, 2017 04:09
-
-
Save Kalimaha/ba1a9cd9c47e9303507fd06ee4e260d3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| @service_consumer('Sous Chef') | |
| @has_pact_with('Grill Chef') | |
| class GrillChefTest(ServiceProviderTest): | |
| @given('steaks are available') | |
| @upon_receiving('a request for a steak') | |
| @with_request({'method': 'POST', 'path': '/steaks/', 'body': {'cooking': 'medium-rare'}}) | |
| @will_respond_with({'status': 201, 'body': {'waitingTime': 10}}) | |
| def test_steak(self): | |
| response = GrillChefRepository.steak('medium-rare') | |
| assert response['waitingTime'] == 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment