Fix lints

pull/84290/head
Hubert 2 weeks ago
parent c1f1cb33c2
commit b41650fb0f

@ -1113,8 +1113,7 @@ def update_url_params(url, params):
:returns: str :returns: str
The updated URL with the new or modified query parameters. The updated URL with the new or modified query parameters.
This function parses the original URL, merges the given parameters with This function parses the original URL, merges the given parameters with existing ones, and returns a new URL string with the updated query parameters.
existing ones, and returns a new URL string with the updated query parameters.
Example: Example:
url = "http://example.com/path?existing_param=value" url = "http://example.com/path?existing_param=value"

@ -452,9 +452,7 @@ def test_params_parameter():
payload = {'key1': 'value1', 'key2': 'value2'} payload = {'key1': 'value1', 'key2': 'value2'}
r = update_url_params('https://httpbin.org/get', payload) r = update_url_params('https://httpbin.org/get', payload)
assert r == "https://httpbin.org/get?key1=value1&key2=value2" assert r == "https://httpbin.org/get?key1=value1&key2=value2"
r = update_url_params('https://httpbin.org/get?key1=oldValue', payload) r = update_url_params('https://httpbin.org/get?key1=oldValue', payload)
assert r == "https://httpbin.org/get?key1=value1&key2=value2" assert r == "https://httpbin.org/get?key1=value1&key2=value2"
r = update_url_params('https://httpbin.org/get?key2=oldValue', payload) r = update_url_params('https://httpbin.org/get?key2=oldValue', payload)
assert r == "https://httpbin.org/get?key2=value2&key1=value1" assert r == "https://httpbin.org/get?key2=value2&key1=value1"

Loading…
Cancel
Save