add test for cognee.add() when tavily is used
This commit is contained in:
parent
5288ab4ab4
commit
925323fb35
1 changed files with 17 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue