MCPcopy
hub / github.com/ScrapeGraphAI/Scrapegraph-ai / test_lazy_load

Function test_lazy_load

tests/test_chromium.py:72–79  ·  view source on GitHub ↗

Test that lazy_load yields Document objects with the correct dummy content and metadata.

(loader_with_dummy)

Source from the content-addressed store, hash-verified

70
71
72def test_lazy_load(loader_with_dummy):
73 """Test that lazy_load yields Document objects with the correct dummy content and metadata."""
74 docs = list(loader_with_dummy.lazy_load())
75 assert len(docs) == 2
76 for doc, url in zip(docs, loader_with_dummy.urls):
77 assert isinstance(doc, Document)
78 assert f"dummy content for {url}" in doc.page_content
79 assert doc.metadata["source"] == url
80
81
82@pytest.mark.asyncio

Callers

nothing calls this directly

Calls 1

lazy_loadMethod · 0.45

Tested by

no test coverage detected