コード例 #1
0
def test_one_param_two_entry_no_comma():

    resp = pre_process_params(ImmutableMultiDict([("name", "John"), ("name", "Lena")]))
    assert resp == {"name": ["John", "Lena"]}
コード例 #2
0
def test_no_params():
    resp = pre_process_params(ImmutableMultiDict([]))
    assert resp == {}
コード例 #3
0
def test_one_param_one_comma():
    resp = pre_process_params(ImmutableMultiDict([("gender", "female,male")]))
    assert resp == {"multiple": {"gender": ["female", "male"]}}
コード例 #4
0
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"]}}