Skip to content

Commit a39c62f

Browse files
Merge pull request #19 from ftobia/patch-1
Allow falsy responses (e.g. 0 not as a string).
2 parents dd3c703 + 95aa93a commit a39c62f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pact/pact.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ def __init__(self, status, headers=None, body=None):
326326
def json(self):
327327
"""Convert the Response to a JSON version for the mock service."""
328328
response = {'status': self.status}
329-
if self.body:
329+
if self.body is not None:
330330
response['body'] = self.body
331331

332332
if self.headers:

0 commit comments

Comments
 (0)