mirror of https://github.com/flaggo/pydu.git
fix test update_query_params error
This commit is contained in:
parent
2417c381da
commit
c0b02c30cd
|
@ -55,6 +55,8 @@ def test_check_connect(port=None):
|
|||
|
||||
|
||||
def test_update_query_params():
|
||||
assert update_query_params('http://example.com/', {'foo': 1}) == 'http://example.com/?foo=1'
|
||||
assert update_query_params('http://example.com/?foo=1', {'foo': 2}) == 'http://example.com/?foo=2'
|
||||
assert update_query_params('http://example.com/?foo=1', {'foo': 2, 'bar': 3}) == 'http://example.com/?foo=2&bar=3'
|
||||
base = 'http://example.com/'
|
||||
assert update_query_params(base, {'foo': 1}) == base + '?foo=1'
|
||||
assert update_query_params(base + '?foo=1', {'foo': 2}) == base + '?foo=2'
|
||||
assert update_query_params(base + '?foo=1', {'foo': 2, 'bar': 3}) in \
|
||||
(base + '?foo=2&bar=3', base + '?foo=2&bar=3')
|
||||
|
|
Loading…
Reference in New Issue