Skip to content

Commit 95aa93a

Browse files
authored
Allow falsy responses (e.g. 0 not as a string).
1 parent dd3c703 commit 95aa93a

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)