summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--test/test_response_headers.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/test_response_headers.py b/test/test_response_headers.py
index e62c1293..ddc22124 100644
--- a/test/test_response_headers.py
+++ b/test/test_response_headers.py
@@ -163,12 +163,11 @@ def test_response_headers_remove():
def test_response_headers_invalid(skip_alert):
- skip_alert(r'failed to apply new conf')
-
def check_invalid(conf):
- assert 'error' in client.conf(
- conf,
- 'routes/0/action/response_headers',
- )
+ resp = client.conf(conf, 'routes/0/action/response_headers')
+ assert 'error' in resp
+
+ return resp
- check_invalid({"X-Foo": "$u"})
+ resp = check_invalid({"X-Foo": "$u"})
+ assert 'detail' in resp and 'Unknown variable' in resp['detail']