From efdf6d5c4cd8155bc54dc667346f58dccb138e07 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Thu, 21 Jan 2021 10:50:11 +0000 Subject: tests/fetch: add test for empty query parameters To exercise the previous patch, add a test case. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- lib/bb/tests/fetch.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'lib/bb/tests') diff --git a/lib/bb/tests/fetch.py b/lib/bb/tests/fetch.py index 1452d7615..20beab385 100644 --- a/lib/bb/tests/fetch.py +++ b/lib/bb/tests/fetch.py @@ -87,6 +87,25 @@ class URITest(unittest.TestCase): }, 'relative': False }, + # Check that trailing semicolons are handled correctly + "http://www.example.org/index.html?qparam1=qvalue1;param2=value2;" : { + 'uri': 'http://www.example.org/index.html?qparam1=qvalue1;param2=value2', + 'scheme': 'http', + 'hostname': 'www.example.org', + 'port': None, + 'hostport': 'www.example.org', + 'path': '/index.html', + 'userinfo': '', + 'username': '', + 'password': '', + 'params': { + 'param2': 'value2' + }, + 'query': { + 'qparam1': 'qvalue1' + }, + 'relative': False + }, "http://www.example.com:8080/index.html" : { 'uri': 'http://www.example.com:8080/index.html', 'scheme': 'http', -- cgit 1.2.3-korg