add test for cognee.add() when tavily is used

This commit is contained in:
Daulet Amirkhanov 2025-10-22 13:08:08 +01:00
parent 5288ab4ab4
commit 925323fb35

View file

@ -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()