def test_getting_all_non_existent_query_parameters_causes_key_error(): query = Query("foo=bar&spam=eggs") try: query.get_all("bacon") except KeyError: assert True else: assert False
def test_can_get_all_parameters_with_name(): query = Query("foo=bar&foo=baz&foo=qux&spam=eggs") values = query.get_all("foo") assert values == ["bar", "baz", "qux"]