tests: fix failing tests

This commit is contained in:
Daulet Amirkhanov 2025-10-22 13:01:06 +01:00
parent ab6a0ef11c
commit 5288ab4ab4
2 changed files with 5 additions and 12 deletions

View file

@ -148,12 +148,6 @@ class BeautifulSoupLoader(LoaderInterface):
"all": True,
"join_with": "\n\n",
},
# Spans with data (fallback for inline content)
"data_spans": {
"selector": "span[data-*]",
"all": True,
"join_with": " ",
},
}
async def load(

View file

@ -185,7 +185,7 @@ async def test_beautiful_soup_loader_is_selected_loader_if_preferred_loader_prov
@pytest.mark.asyncio
async def test_beautiful_soup_loader_raises_if_required_args_are_missing():
async def test_beautiful_soup_loader_works_with_and_without_arguments():
await cognee.prune.prune_data()
await cognee.prune.prune_system(metadata=True)
@ -203,11 +203,10 @@ async def test_beautiful_soup_loader_raises_if_required_args_are_missing():
bs_loader = BeautifulSoupLoader()
loader_engine.register_loader(bs_loader)
preferred_loaders = {"beautiful_soup_loader": {}}
with pytest.raises(ValueError):
await loader_engine.load_file(
file_path,
preferred_loaders=preferred_loaders,
)
await loader_engine.load_file(
file_path,
preferred_loaders=preferred_loaders,
)
extraction_rules = {
"title": {"selector": "title"},
"headings": {"selector": "h1, h2, h3", "all": True},