diff options
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index 0f1cb7670d..48b9e4af16 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -1401,7 +1401,10 @@ class TrustedNetworksTest(FetcherTest): | |||
| 1401 | self.assertFalse(bb.fetch.trusted_network(self.d, url)) | 1401 | self.assertFalse(bb.fetch.trusted_network(self.d, url)) |
| 1402 | 1402 | ||
| 1403 | class URLHandle(unittest.TestCase): | 1403 | class URLHandle(unittest.TestCase): |
| 1404 | import urllib.parse | ||
| 1404 | 1405 | ||
| 1406 | # Quote password as per RFC3986 | ||
| 1407 | password = urllib.parse.quote(r"!#$%^&*()-_={}[]\|:?,.<>~`", r"!$&'/()*+,;=") | ||
| 1405 | datatable = { | 1408 | datatable = { |
| 1406 | "http://www.google.com/index.html" : ('http', 'www.google.com', '/index.html', '', '', {}), | 1409 | "http://www.google.com/index.html" : ('http', 'www.google.com', '/index.html', '', '', {}), |
| 1407 | "cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}), | 1410 | "cvs://anoncvs@cvs.handhelds.org/cvs;module=familiar/dist/ipkg" : ('cvs', 'cvs.handhelds.org', '/cvs', 'anoncvs', '', {'module': 'familiar/dist/ipkg'}), |
| @@ -1410,7 +1413,7 @@ class URLHandle(unittest.TestCase): | |||
| 1410 | "file://somelocation;someparam=1": ('file', '', 'somelocation', '', '', {'someparam': '1'}), | 1413 | "file://somelocation;someparam=1": ('file', '', 'somelocation', '', '', {'someparam': '1'}), |
| 1411 | "file://example@.service": ('file', '', 'example@.service', '', '', {}), | 1414 | "file://example@.service": ('file', '', 'example@.service', '', '', {}), |
| 1412 | "https://somesite.com/somerepo.git;user=anyUser:idtoken=1234" : ('https', 'somesite.com', '/somerepo.git', '', '', {'user': 'anyUser:idtoken=1234'}), | 1415 | "https://somesite.com/somerepo.git;user=anyUser:idtoken=1234" : ('https', 'somesite.com', '/somerepo.git', '', '', {'user': 'anyUser:idtoken=1234'}), |
| 1413 | r'git://s.o-me_ONE:!#$%^&*()-_={}[]\|:?,.<>~`@git.openembedded.org/bitbake;branch=main;protocol=https': ('git', 'git.openembedded.org', '/bitbake', 's.o-me_ONE', r'!#$%^&*()-_={}[]\|:?,.<>~`', {'branch': 'main', 'protocol' : 'https'}), | 1416 | 'git://s.o-me_ONE:%s@git.openembedded.org/bitbake;branch=main;protocol=https' % password: ('git', 'git.openembedded.org', '/bitbake', 's.o-me_ONE', password, {'branch': 'main', 'protocol' : 'https'}), |
| 1414 | } | 1417 | } |
| 1415 | # we require a pathname to encodeurl but users can still pass such urls to | 1418 | # we require a pathname to encodeurl but users can still pass such urls to |
| 1416 | # decodeurl and we need to handle them | 1419 | # decodeurl and we need to handle them |
