add antibot unit tests

This commit is contained in:
qananasikq
2026-04-10 15:15:07 +03:00
parent 18dab6d48d
commit db2fa5ec17
2 changed files with 29 additions and 0 deletions

View File

@@ -57,6 +57,12 @@ class TestVehicleParserUnit(unittest.TestCase):
self.assertTrue(hints["has_captcha_text"])
self.assertTrue(hints["has_antibot_text"])
def test_access_notes_reflect_antibot_signals(self) -> None:
summary = {"vin": "", "image_urls": [], "note": "Incapsula access denied. Verify you are human."}
notes = self.parser._build_access_notes(summary, [])
self.assertTrue(notes["possible_captcha"])
self.assertTrue(notes["possible_antibot"])
if __name__ == "__main__":
unittest.main()