refactor tavily_crawler test

This commit is contained in:
Daulet Amirkhanov 2025-10-21 23:13:40 +01:00
parent 3f5c09eb45
commit a35bcecdf9

View file

@ -1,14 +1,11 @@
import os
import pytest
from cognee.tasks.web_scraper.config import TavilyConfig
from cognee.tasks.web_scraper.utils import fetch_with_tavily
@pytest.mark.asyncio
async def test_fetch():
url = "https://en.wikipedia.org/wiki/Large_language_model"
tavily_config = TavilyConfig()
results = await fetch_with_tavily(url, tavily_config)
results = await fetch_with_tavily(url)
assert len(results) == 1
assert isinstance(results, dict)
html = results[url]