pull/31490/merge
Ryan Welton 1 month ago committed by GitHub
commit 471dad7226
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -560,6 +560,7 @@ class TestUtil(unittest.TestCase):
self.assertEqual(base_url('http://foo.de/bar/'), 'http://foo.de/bar/')
self.assertEqual(base_url('http://foo.de/bar/baz'), 'http://foo.de/bar/')
self.assertEqual(base_url('http://foo.de/bar/baz?x=z/x/c'), 'http://foo.de/bar/')
self.assertEqual(base_url('http://foo.de/bar/baz&x=z&w=y/x/c'), 'http://foo.de/bar/baz&x=z&w=y/x/')
def test_urljoin(self):
self.assertEqual(urljoin('http://foo.de/', '/a/b/c.txt'), 'http://foo.de/a/b/c.txt')

@ -3825,7 +3825,7 @@ def url_basename(url):
def base_url(url):
return re.match(r'https?://[^?#&]+/', url).group()
return re.match(r'https?://[^?#]+/', url).group()
def urljoin(base, path):

Loading…
Cancel
Save