Commit Graph
16 Commits
Author SHA1 Message Date
e90ca42aac test: cover #2666 TODO-test paths (cookie_jar forwarding, extract_ids_from_results) (#2795)
Closes #2666.

Issue #2666 tracked four paths flagged `# TODO: tests`. Two of them
(`executors.py` increment_progress / stop_progress) were removed by the
#2789 refactor and no longer exist. This PR covers the two that remain:

1. maigret/checking.py:247 — the ClientSession cookie_jar forwarding.
   SimpleAiohttpChecker.check() builds ClientSession(cookie_jar=self.cookie_jar
   if self.cookie_jar else None), but nothing asserted the jar handed to the
   checker actually reached the outgoing session. Added two tests using the
   existing constructor-capture pattern (_capture_clientsession): one asserts
   a configured jar is forwarded verbatim, the other asserts None is passed
   when no jar is configured (the else branch).

2. maigret/maigret.py:946 — extract_ids_from_results. The pre-existing
   test_extract_ids_from_results was a bare expression with no `assert` (so
   it silently passed regardless of return value) AND pinned its expectation
   against test_db (tests/db.json), whose site set never matched the Reddit
   URL and silently dropped the ids_links result. Fixed: real assertion against
   default_db, plus three branch tests (cross-site username merge, empty-site
   skip, empty input).

No new dependencies: aioresponses was suggested in the issue but is not in
the project — the existing monkeypatch capture pattern fits the codebase
better and adds zero deps.

Removed both `# TODO: tests` comments from the now-covered lines.

Co-authored-by: aznikline <aznikline@users.noreply.github.com>
2026-06-22 19:22:37 +02:00
SoxojandGitHub 3eaec01523 Code cleanup and refactoring after ponytail audit (#2789) 2026-06-21 12:51:01 +02:00
5888f81235 Fix HackerNews and Rajce.net false positives (#2780)
* Fix HackerNews and Rajce.net false positives

* Fix HackerNews and Rajce.net false positives

---------

Co-authored-by: Codex <codex@openai.com>
2026-06-18 19:42:41 +02:00
Xinmin ZengandGitHub 13f43b3420 Fix async activation retry handling (#2765)
Convert activation HTTP calls to aiohttp coroutines, await activation before retrying, and allocate independent protocol checkers per site check so concurrent retries do not overwrite shared checker state.
2026-06-13 16:34:24 +02:00
c7edebb57a Refactor error detection and username extraction (#2701)
Co-authored-by: Soxoj <31013580+soxoj@users.noreply.github.com>
2026-06-07 13:38:51 +02:00
SoxojandGitHub a89b7f09a7 Fix DNS resolver failures: classify aiodns errors, add --dns-resolver threaded fallback (#2688) (#2717)
* Fix DNS resolver failures: classify aiodns errors, add --dns-resolver threaded fallback (#2688)

* test: include dns_resolver in CLI default args
2026-05-30 16:09:54 +02:00
SoxojandGitHub ceed9aa9cc fix(Instagram): refresh rate-limit marker for stale Login title (#2674) 2026-05-16 18:23:13 +02:00
SoxojandGitHub 51a5169987 fix(checking): reject URLs and emails extracted as usernames (#2673)
Closes #1403
2026-05-16 17:52:00 +02:00
Raz Ben YaishandGitHub 650f990547 test(checking): cover CurlCffiChecker proxy forwarding (#2652) 2026-05-13 13:33:17 +02:00
SoxojandGitHub 264bae34d6 Add test for CheckError bug (#2631) 2026-05-09 16:11:07 +03:00
SoxojandGitHub 1352bd35c6 Fix site checks: 5 fixed, 4 disabled; fix UA leak bug (#2569) 2026-04-26 14:51:44 +02:00
SoxojandGitHub 25026e21ea Fix site checks: 4 → ip_reputation, 9 fixed, 16 disabled, 3 dead dele… (#2555)
* Fix site checks: 4 → ip_reputation, 9 fixed, 16 disabled, 3 dead deleted; clarify ip_reputation tag semantics

* Improved test coverage
2026-04-23 21:17:07 +02:00
Soxoj a76f95858f Added checker of Tor sites 2021-05-20 23:26:02 +03:00
Soxoj 2c04ccce57 Improved tests 2021-05-18 00:43:56 +03:00
Soxoj f43dc5bd6f Errors stats MVP, some fp fixes 2021-04-25 01:08:23 +03:00
Soxoj 314eb25d1f Created async requests executors, some sites fixes 2021-03-20 20:57:07 +03:00