mirror of
https://github.com/soxoj/maigret.git
synced 2026-05-09 16:14:32 +00:00
Add test for CheckError bug
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -3158,7 +3158,7 @@ Rank data fetched from Majestic Million by domains.
|
||||
1.  [AirNFTs (https://app.airnfts.com)](https://app.airnfts.com)*: top 100M, crypto, nft*
|
||||
1.  [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%
|
||||
|
||||
@@ -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 ----
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user