Signed-off-by: Artem Inzhyyants <artem.inzhyyants@gmail.com> Co-authored-by: Artem Inzhyyants <artem.inzhyyants@gmail.com>
18 lines
478 B
Python
18 lines
478 B
Python
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
|
|
|
|
import pytest
|
|
from source_gitlab.utils import parse_url
|
|
|
|
|
|
@pytest.mark.parametrize(
|
|
"url, expected",
|
|
(
|
|
("http://example.com", (True, "http", "example.com")),
|
|
("http://example", (True, "http", "example")),
|
|
("test://example.com", (False, "", "")),
|
|
("https://example.com/test/test2", (False, "", "")),
|
|
)
|
|
)
|
|
def test_parse_url(url, expected):
|
|
assert parse_url(url) == expected
|