28 lines
783 B
Python
28 lines
783 B
Python
from pytest_abra.utils import BaseUrl
|
|
|
|
url_input = {
|
|
"netloc": "blog.dev.local-it.cloud",
|
|
"scheme": "https",
|
|
}
|
|
|
|
url_obj = BaseUrl(**url_input)
|
|
|
|
|
|
def test_urllib_domain_only():
|
|
assert url_obj.get() == "https://blog.dev.local-it.cloud"
|
|
|
|
|
|
def test_urllib_path_single():
|
|
assert url_obj.get(path="something") == "https://blog.dev.local-it.cloud/something"
|
|
|
|
|
|
def test_urllib_path_double():
|
|
assert url_obj.get(path="something/else") == "https://blog.dev.local-it.cloud/something/else"
|
|
|
|
|
|
def test_urllib_path_signle_suc_slash():
|
|
assert url_obj.get(path="something/else/") == "https://blog.dev.local-it.cloud/something/else/"
|
|
|
|
|
|
def test_urllib_path_signle_pre_slash():
|
|
assert url_obj.get(path="/something/else") == "https://blog.dev.local-it.cloud/something/else"
|