Spaces:
Running
Running
File size: 579 Bytes
1d47e3c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | from app.main import _normalize_qdrant_url
def test_normalize_qdrant_url_strips_dashboard_path() -> None:
url = "https://example.qdrant.io/dashboard"
assert _normalize_qdrant_url(url) == "https://example.qdrant.io"
def test_normalize_qdrant_url_adds_scheme_for_cloud_host() -> None:
url = "cluster-id.aws.cloud.qdrant.io"
assert _normalize_qdrant_url(url) == "https://cluster-id.aws.cloud.qdrant.io"
def test_normalize_qdrant_url_uses_http_for_localhost() -> None:
url = "localhost:6333"
assert _normalize_qdrant_url(url) == "http://localhost:6333"
|