Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow falsy responses (e.g. 0 not as a string). #19

Merged
merged 1 commit into from
May 31, 2017

Conversation

ftobia
Copy link
Contributor

@ftobia ftobia commented May 29, 2017

In playing with pact-python I found I was unable to generate a pact file with a body of 0 where the 0 wasn't already a string (e.g. it's a json-encoded response of the number 0). I believe this PR rectifies the issue.

@ftobia
Copy link
Contributor Author

ftobia commented May 29, 2017

Let me know if you want a regression test as part of this PR. I can try to get to it this week (I haven't stood up a pact dev environment yet, I manually verified this fix with the code I've been using to play with Pact).

Thanks for porting pact to python, so far it's really great.

@matthewbalvanz-wf
Copy link
Contributor

@ftobia Thanks for submitting this PR. That's definitely an issue, and I'm surprised I didn't think of it when I put it together initially, because it would fail for things like empty lists and dicts.

I can setup a test for this and get both merged into master.

@matthewbalvanz-wf matthewbalvanz-wf merged commit a39c62f into pact-foundation:master May 31, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants