deb-python-gabbi/gabbi/tests/gabbits_intercept/jsonbody.yaml
Chris Dent 60719215b8 Support testing of full json responses
This feature was effectively already there but not fleshed out in
tests nor documentation. Now there are some tests and a short
piece of documentation with a light warning about avoiding overuse.

A slight adjustment was required in data handling to deal with
empty lists and empty objects.

Fixes #113
2016-03-16 17:32:59 +00:00

39 lines
763 B
YAML

# See if $ is the whole thing
tests:
- name: test fully body
url: /foobar
method: POST
request_headers:
content-type: application/json
data:
alpha:
- one
- two
beta: hello
response_json_paths:
$:
alpha:
- one
- two
beta: hello
- name: test empty dict
url: /foobar
method: POST
request_headers:
content-type: application/json
data: {}
response_json_paths:
$: {}
- name: test empty list
url: /foobar
method: POST
request_headers:
content-type: application/json
data: []
response_json_paths:
$: []