diff options
| author | Chuck Short <chuck.short@canonical.com> | 2013-08-14 07:51:53 -0400 |
|---|---|---|
| committer | Chuck Short <chuck.short@canonical.com> | 2013-08-14 07:53:20 -0400 |
| commit | eaec23b7ca0f4f52aec643db158c22f0af0d70c1 (patch) | |
| tree | 891279de1ae45b76e763f104651a2275d64a02b7 /tests | |
| parent | 2548344ec644de763a18d7f582094d2e26861887 (diff) | |
py3kcompat: Add urljoin compatibility
Add urljoin for python2/python3 compatibility,
used by python-keystoneclient.
Change-Id: Ied0841bf6b34d0087002c77915031156767b3d8d
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/unit/test_compat.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/unit/test_compat.py b/tests/unit/test_compat.py index 2e08f37..5c3d9e5 100644 --- a/tests/unit/test_compat.py +++ b/tests/unit/test_compat.py @@ -26,6 +26,12 @@ class CompatTestCase(utils.BaseTestCase): result = urlutils.urlencode({'Fake': fake}) self.assertEquals(result, 'Fake=fake') + def test_urljoin(self): + root_url = "http://yahoo.com/" + url2 = "faq.html" + result = urlutils.urljoin(root_url, url2) + self.assertEquals(result, "http://yahoo.com/faq.html") + def test_urlquote(self): url = "/~fake" result = urlutils.quote(url) |
