fix: improve login flow tests

Login Flow Tests:
- Fixed test_login_flow_handles_captcha to properly handle both login
attempts
- Added individual test functions for each component of the login flow:
  * test_check_and_wait_for_captcha: Tests captcha detection and user
interaction
  * test_fill_login_data_and_send: Tests login form filling and
submission
  * test_handle_after_login_logic: Tests post-login handling (device
verification, GDPR)
- Improved test assertions to match actual behavior of the login process
- Added proper async mocking to prevent test stalling

Test Init:
- Fixed test_extract_pricing_info to properly handle all price formats
- Improved test coverage for price extraction edge cases
- Ensured tests accurately reflect the actual behavior of the price
extraction logic
This commit is contained in:
Jens Bergmann
2025-06-09 21:30:03 +02:00
committed by Sebastian Thomschke
parent 8ac57932ba
commit 92ac17b430
2 changed files with 110 additions and 14 deletions

View File

@@ -508,7 +508,7 @@ class KleinanzeigenBot(WebScrapingMixin):
if not is_login_page:
await self.web_scroll_page_down()
input(_("Press a key to continue..."))
await ainput(_("Press a key to continue..."))
except TimeoutError:
pass