From 199426fb173a172f4f049598389f8af7bf94c931 Mon Sep 17 00:00:00 2001 From: Soxoj Date: Sat, 9 May 2026 10:59:16 +0300 Subject: [PATCH] Add test for CheckError bug --- maigret/resources/db_meta.json | 2 +- sites.md | 2 +- tests/test_checking.py | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/maigret/resources/db_meta.json b/maigret/resources/db_meta.json index e372d27..cd2162c 100644 --- a/maigret/resources/db_meta.json +++ b/maigret/resources/db_meta.json @@ -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", diff --git a/sites.md b/sites.md index a363fbc..9a3fd0a 100644 --- a/sites.md +++ b/sites.md @@ -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% diff --git a/tests/test_checking.py b/tests/test_checking.py index 70021a5..0e508e6 100644 --- a/tests/test_checking.py +++ b/tests/test_checking.py @@ -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 ----