20 lines
460 B
Python
20 lines
460 B
Python
# -*- coding: utf-8 -*-
|
|
from __future__ import unicode_literals
|
|
|
|
from librefi.utils import absolute_url
|
|
from librefi.compat import compat_str
|
|
|
|
OLD_URL = "https://sakamoto.pl/ddd"
|
|
NEW_URL_RELATIVE = "/DDD?test=yes"
|
|
|
|
# expected value
|
|
NEW_URL_ABSOLUTE = "https://sakamoto.pl/DDD?test=yes"
|
|
|
|
|
|
def test_basic():
|
|
abso = absolute_url(NEW_URL_RELATIVE, OLD_URL)
|
|
assert isinstance(abso, (compat_str))
|
|
print(abso)
|
|
assert abso == NEW_URL_ABSOLUTE
|
|
pass
|