Skip to content

Commit

Permalink
fix: improve a test
Browse files Browse the repository at this point in the history
  • Loading branch information
juancarlospaco committed Dec 11, 2024
1 parent d820883 commit f3a31b9
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions tests/test_qdrant.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,33 +59,6 @@ def test_qdrant_migrate(
assert len(recs) == 100


def test_qdrant_migrate_bad_url(
qdrant_collection_name: str,
postgres_connection_string: str,
cursor,
cli_runner: CliRunner,
) -> None:

with warnings.catch_warnings():
warnings.simplefilter("ignore")

with pytest.raises(Exception) as url_checker:
result = cli_runner.invoke(
app,
[
"qdrant",
"migrate",
qdrant_collection_name,
"", # Bad HTTP URL as intended.
"", # no API key needed in :memory: mode
postgres_connection_string,
],
)
raise result.exception

assert "qdrant_url must be a valid HTTP URL string" in str(url_checker.value)


def test_is_http_url():
with pytest.raises(AssertionError) as url_checker:
assert is_http_url("https://supabase.com/"), "Invalid URL pattern"
Expand Down

0 comments on commit f3a31b9

Please sign in to comment.