From 925323fb35e7d9b56b30087f4b7b5e4bb99af61b Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Wed, 22 Oct 2025 13:08:08 +0100 Subject: [PATCH] add test for `cognee.add()` when tavily is used --- .../web_url_crawler/test_url_adding_e2e.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/cognee/tests/integration/web_url_crawler/test_url_adding_e2e.py b/cognee/tests/integration/web_url_crawler/test_url_adding_e2e.py index c098f5928..7be0df341 100644 --- a/cognee/tests/integration/web_url_crawler/test_url_adding_e2e.py +++ b/cognee/tests/integration/web_url_crawler/test_url_adding_e2e.py @@ -1,3 +1,4 @@ +import os import pytest import cognee from cognee.infrastructure.files.utils.get_data_file_path import get_data_file_path @@ -67,6 +68,22 @@ async def test_add_url(): await cognee.add("https://en.wikipedia.org/wiki/Large_language_model") +skip_in_ci = pytest.mark.skipif( + os.getenv("GITHUB_ACTIONS") == "true", + reason="Skipping in Github for now - before we get TAVILY_API_KEY", +) + + +@skip_in_ci +@pytest.mark.asyncio +async def test_add_url_with_tavily(): + assert os.getenv("TAVILY_API_KEY") is not None + await cognee.prune.prune_data() + await cognee.prune.prune_system(metadata=True) + + await cognee.add("https://en.wikipedia.org/wiki/Large_language_model") + + @pytest.mark.asyncio async def test_add_url_without_incremental_loading(): await cognee.prune.prune_data()