MCPcopy Create free account
hub / github.com/apify/crawlee-python / test_sitemap_from_string

Function test_sitemap_from_string

tests/unit/_utils/test_sitemap.py:292–297  ·  view source on GitHub ↗

Test creating a Sitemap instance from an XML string.

()

Source from the content-addressed store, hash-verified

290
291
292async def test_sitemap_from_string() -> None:
293 """Test creating a Sitemap instance from an XML string."""
294 sitemap = await Sitemap.from_xml_string(get_basic_sitemap())
295
296 assert len(sitemap.urls) == 5
297 assert set(sitemap.urls) == get_basic_results()
298
299
300async def test_sitemap_fetch_retries_on_transient_error() -> None:

Callers

nothing calls this directly

Calls 3

get_basic_sitemapFunction · 0.90
get_basic_resultsFunction · 0.90
from_xml_stringMethod · 0.80

Tested by

no test coverage detected