diff options
author | Sergey M․ <dstftw@gmail.com> | 2017-03-06 03:57:46 +0700 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2017-03-06 03:57:46 +0700 |
commit | 4b5de77bdb7765df4797bf068592926285ba709a (patch) | |
tree | 92695bf40e9b18e7558cd439106cece72a309855 /test/test_utils.py | |
parent | 96182695e4e37795a30ab143129c91dab18a9865 (diff) |
[utils] Process bytestrings in urljoin (closes #12369)
Diffstat (limited to 'test/test_utils.py')
-rw-r--r-- | test/test_utils.py | 3 |
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') |