Test loading a gzipped sitemap with correct type and .xml.gz url.
(server_url: URL, http_client: HttpClient)
| 130 | |
| 131 | |
| 132 | async def test_gzipped_sitemap(server_url: URL, http_client: HttpClient) -> None: |
| 133 | """Test loading a gzipped sitemap with correct type and .xml.gz url.""" |
| 134 | gzipped_data = encode_base64(compress_gzip(get_basic_sitemap(url=server_url))) |
| 135 | sitemap_url = (server_url / 'sitemap.xml.gz').with_query(base64=gzipped_data, c_type='application/gzip') |
| 136 | sitemap = await Sitemap.load(str(sitemap_url), http_client=http_client) |
| 137 | assert len(sitemap.urls) == 5 |
| 138 | assert set(sitemap.urls) == get_basic_results(server_url) |
| 139 | |
| 140 | |
| 141 | async def test_gzipped_sitemap_with_invalid_data(server_url: URL, http_client: HttpClient) -> None: |
nothing calls this directly
no test coverage detected