aboutsummaryrefslogtreecommitdiff
path: root/test/test_utils.py
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2017-03-06 03:57:46 +0700
committerSergey M․ <dstftw@gmail.com>2017-03-06 03:57:46 +0700
commit4b5de77bdb7765df4797bf068592926285ba709a (patch)
tree92695bf40e9b18e7558cd439106cece72a309855 /test/test_utils.py
parent96182695e4e37795a30ab143129c91dab18a9865 (diff)
[utils] Process bytestrings in urljoin (closes #12369)
Diffstat (limited to 'test/test_utils.py')
-rw-r--r--test/test_utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/test_utils.py b/test/test_utils.py
index aefd94518..173c49514 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -455,6 +455,9 @@ class TestUtil(unittest.TestCase):
def test_urljoin(self):
self.assertEqual(urljoin('http://foo.de/', '/a/b/c.txt'), 'http://foo.de/a/b/c.txt')
+ self.assertEqual(urljoin(b'http://foo.de/', '/a/b/c.txt'), 'http://foo.de/a/b/c.txt')
+ self.assertEqual(urljoin('http://foo.de/', b'/a/b/c.txt'), 'http://foo.de/a/b/c.txt')
+ self.assertEqual(urljoin(b'http://foo.de/', b'/a/b/c.txt'), 'http://foo.de/a/b/c.txt')
self.assertEqual(urljoin('//foo.de/', '/a/b/c.txt'), '//foo.de/a/b/c.txt')
self.assertEqual(urljoin('http://foo.de/', 'a/b/c.txt'), 'http://foo.de/a/b/c.txt')
self.assertEqual(urljoin('http://foo.de', '/a/b/c.txt'), 'http://foo.de/a/b/c.txt')