[tests] test with multiple optional parameteres

This commit is contained in:
Maxime Alves LIRMM 2023-02-21 19:30:59 +01:00
parent b7c5704c95
commit e065fe04e4
1 changed files with 6 additions and 5 deletions

View File

@ -21,8 +21,8 @@ def test_call(application_debug):
assert r.status_code == 400
assert r.headers['x-domain'] == 'dummy_domain'
assert r.headers['x-acl'] == 'public'
assert 'foo' in r.headers['x-args-required']
assert 'bar' in r.headers['x-args-required']
assert 'foo' in r.headers['x-args-required'].split(',')
assert 'bar' in r.headers['x-args-required'].split(',')
assert r.headers['x-args-optional'] == 'x'
c = TestClient(application_debug)
@ -30,8 +30,9 @@ def test_call(application_debug):
assert r.status_code == 400
assert r.headers['x-domain'] == 'dummy_domain'
assert r.headers['x-acl'] == 'public'
assert 'foo' in r.headers['x-args-required']
assert 'baz' in r.headers['x-args-required']
assert r.headers['x-args-optional'] == 'truebidoo'
assert 'foo' in r.headers['x-args-required'].split(',')
assert 'baz' in r.headers['x-args-required'].split(',')
assert 'truebidoo' in r.headers['x-args-optional'].split(',')
assert 'z' in r.headers['x-args-optional'].split(',')