deb-python-gabbi/test-failskip.sh
Chris Dent 541eeb3662 Make sure all response content marked as JSON is decoded
Until this change only response bodies with a content-type of
'application/json' were decoded from JSON and stored in the
json_data attribute. Now '+json' style content-types also get the
same treatment.

json_data is the attribute later used when checking
response_json_paths. An expectation of a correct content type has
always been present but the docs have been update to make this
clear.

In the future when other content types will have handling similar to
JSON, this processing will need to be encapsulated in the
implementations of each content type handler. This fix is short
term.
2015-07-31 15:38:41 +01:00

14 lines
406 B
Bash
Executable File

#!/bin/bash -e
# Run the tests and confirm that the stuff we expect to skip or fail
# does.
GREP_FAIL_MATCH='expected failures=9'
GREP_SKIP_MATCH='skipped=2'
GREP_UXSUC_MATCH='unexpected successes=1'
python setup.py testr && \
for match in "${GREP_FAIL_MATCH}" "${GREP_UXSUC_MATCH}" "${GREP_SKIP_MATCH}"; do
testr last --subunit | subunit2pyunit 2>&1 | \
grep "${match}"
done