Add test for CheckError bug

This commit is contained in:
Soxoj
2026-05-09 10:59:16 +03:00
parent b98a134fcf
commit 199426fb17
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"version": 1,
"updated_at": "2026-05-05T20:17:24Z",
"updated_at": "2026-05-09T07:59:17Z",
"sites_count": 3154,
"min_maigret_version": "0.6.0",
"data_sha256": "acf9d9fef8412bf05fa09d50c1ae363e5c8394597b1aaa3f98a9a1c4e31ca356",
+1 -1
View File
@@ -3158,7 +3158,7 @@ Rank data fetched from Majestic Million by domains.
1. ![](https://www.google.com/s2/favicons?domain=https://app.airnfts.com) [AirNFTs (https://app.airnfts.com)](https://app.airnfts.com)*: top 100M, crypto, nft*
1. ![](https://www.google.com/s2/favicons?domain=https://greasyfork.org) [GreasyFork (https://greasyfork.org)](https://greasyfork.org)*: top 100M, coding*
The list was updated at (2026-05-05)
The list was updated at (2026-05-09)
## Statistics
Enabled/total sites: 2510/3154 = 79.58%
+10
View File
@@ -309,6 +309,16 @@ def test_process_site_result_with_error_is_unknown():
assert out["status"].error is not None
def test_process_site_result_error_context_uses_instance():
# Regression: context must render the CheckError instance, not the class.
site = _make_site({"checkType": "status_code"})
info = {"username": "a", "parsing_enabled": False, "url_user": "https://x/a"}
err = CheckError("Request timeout", "slow server")
out = process_site_result(("body", 0, err), Mock(), Mock(), info, site)
assert out["status"].context == "Request timeout error: slow server"
assert "class" not in out["status"].context
# ---- CurlCffiChecker: TLS impersonation header sanitisation ----