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

implement some rudiment json part test #47

Closed
wants to merge 1 commit into from

Conversation

dready
Copy link

@dready dready commented Sep 11, 2013

while testing a list resource (get all items) i found it hard to check if specific parts of items are present. The simple theResponseShouldContainJson does not allow you to check for part of the data and the theResponseShouldContain does not work well with json data structure.

this allows you to use a PyStringNode to check for. It is not perfect but works for me.

For Example:
And response should contain data:
"""
{"foo":null,"bar":null,"baz":1,"text":"My good text","description":null,"id":1}
"""

Theoretically you can test any data with it, not just json (no parsing/decoding included)

in case you are testing a list ressource
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.

1 participant