From e065fe04e4dff72bec48fa3be36a3f8e28b22d08 Mon Sep 17 00:00:00 2001 From: Maxime Alves LIRMM Date: Tue, 21 Feb 2023 19:30:59 +0100 Subject: [PATCH] [tests] test with multiple optional parameteres --- tests/test_lib_domain_middlware.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_lib_domain_middlware.py b/tests/test_lib_domain_middlware.py index 34983fa..4737838 100644 --- a/tests/test_lib_domain_middlware.py +++ b/tests/test_lib_domain_middlware.py @@ -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(',')