deb-python-gabbi/gabbi/tests/gabbits_intercept/forbiddenheaders.yaml
Chris Dent 7a5b61c2d5 Add response_forbidden_headers handler
After much discussion this was determined to be the easiest and
cleanest way to accomplish a test which asserts "this header must
not be present". The ResponseHandler framework is used to good
effect to make short code.

The value of the response_forbidden_headers is a list of headers.
Case will be normalized to lower, which matches the internal
representation of the response headers dictionary.

Fixes #108
2015-12-09 18:11:53 +00:00

31 lines
756 B
YAML

#
# Test that headers that should not be there are definitely not
# there. These mostly test in a negative fashion.
#
tests:
- name: header not there basic
GET: /foobar
response_headers:
x-gabbi-url: $SCHEME://$NETLOC/foobar
response_forbidden_headers:
- no-there-one
- no-there-two
- name: header is there fail
xfail: True
GET: /foobar
response_headers:
x-gabbi-url: $SCHEME://$NETLOC/foobar
response_forbidden_headers:
- x-gabbi-url
- name: header is there fail case insensitive
xfail: True
GET: /foobar
response_headers:
x-gabbi-url: $SCHEME://$NETLOC/foobar
response_forbidden_headers:
- x-gaBBi-uRl