def test_one_param_two_entry_no_comma(): resp = pre_process_params(ImmutableMultiDict([("name", "John"), ("name", "Lena")])) assert resp == {"name": ["John", "Lena"]}
def test_no_params(): resp = pre_process_params(ImmutableMultiDict([])) assert resp == {}
def test_one_param_one_comma(): resp = pre_process_params(ImmutableMultiDict([("gender", "female,male")])) assert resp == {"multiple": {"gender": ["female", "male"]}}
def test_one_param_two_entries_one_comma(): resp = pre_process_params(ImmutableMultiDict([("language", "FR"), ("language", "NL,EN")])) assert resp == {"language": ["FR"], "multiple": {"language": ["NL", "EN"]}}