forked from Github-Mirrors/canaille
19 lines
557 B
Python
19 lines
557 B
Python
![]() |
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"
|
||
|
)
|