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"