Skip to content

Commit

Permalink
Merge pull request #19 from ftobia/patch-1
Browse files Browse the repository at this point in the history
Allow falsy responses (e.g. 0 not as a string).
  • Loading branch information
matthewbalvanz-wf authored May 31, 2017
2 parents dd3c703 + 95aa93a commit a39c62f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pact/pact.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def __init__(self, status, headers=None, body=None):
def json(self):
"""Convert the Response to a JSON version for the mock service."""
response = {'status': self.status}
if self.body:
if self.body is not None:
response['body'] = self.body

if self.headers:
Expand Down

0 comments on commit a39c62f

Please sign in to comment.