librefi/tests/url_utils.py

16 lines
350 B
Python
Raw Normal View History

2020-09-18 18:12:30 +02:00
from librefi.utils import absolute_url
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, (str))
print(abso)
assert abso == NEW_URL_ABSOLUTE
pass