from canaille.flaskutils import set_parameter_in_url_query def test_set_parameter_in_url_query(): assert ( set_parameter_in_url_query("https://auth.mydomain.tld", foo="bar") == "https://auth.mydomain.tld?foo=bar" ) assert ( set_parameter_in_url_query("https://auth.mydomain.tld?foo=baz", foo="bar") == "https://auth.mydomain.tld?foo=bar" ) assert ( set_parameter_in_url_query("https://auth.mydomain.tld?foo=baz", hello="world") == "https://auth.mydomain.tld?foo=baz&hello=world" )