wrongmove/tests/unit
Viktor Barzin f833309297
Refactor backend for cleaner error handling, DRY, and type safety
- Extract rate limiter DRY: consolidate 3 duplicated check/respond paths
  into _check_counter and _enforce_limit helpers, add proper type annotations
- Replace bare Exception raises with FloorplanDownloadError and
  RightmoveApiError; narrow catch clauses to specific exception types;
  fix Step base class to inherit from ABC
- Consolidate MAX_OCR_WORKERS into config/scraper_config.py; extract
  _find_tenure_value helper to deduplicate tenure parsing
- Extract _build_poi_distances_lookup from stream endpoint to reduce nesting
- Fix csv_exporter: optional decisions.json, NaN instead of -1 sentinels,
  guard against division by zero on missing square meters
- Fix notifications.py broken list[Surface]() constructor, database.py
  stale comments and missing type annotation, auth.py type:ignore,
  ui_exporter.py stale TODO
- Fix 3 pre-existing test failures: mock cache layer in streaming tests,
  bypass rate limiter for test isolation, fix cache invalidation test to
  account for two-pattern scan loop
2026-02-10 22:19:24 +00:00
..
__init__.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_auth.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_cli.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_district_service.py Add comprehensive test suite: 219 new tests across backend and frontend 2026-02-10 21:59:45 +00:00
test_districts.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_export_service.py Add comprehensive test suite: 219 new tests across backend and frontend 2026-02-10 21:59:45 +00:00
test_floorplan.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_floorplan_detector.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_frontend_build_config.py Remove JS obfuscator that broke Mapbox GL map rendering 2026-02-08 22:47:01 +00:00
test_image_fetcher.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_listing_cache.py Refactor backend for cleaner error handling, DRY, and type safety 2026-02-10 22:19:24 +00:00
test_listing_fetcher.py Refactor backend for cleaner error handling, DRY, and type safety 2026-02-10 22:19:24 +00:00
test_listing_processor.py Refactor backend for cleaner error handling, DRY, and type safety 2026-02-10 22:19:24 +00:00
test_listing_service.py Add comprehensive test suite: 219 new tests across backend and frontend 2026-02-10 21:59:45 +00:00
test_listing_tasks.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_metrics_guard.py Add API rate limiting, metrics guard, and audit middleware 2026-02-08 00:45:43 +00:00
test_models.py Add security regression tests for all hardening fixes 2026-02-08 19:42:53 +00:00
test_openapi_disabled.py Add API anti-abuse hardening: disable docs in prod, origin validator, exception handler 2026-02-08 20:06:46 +00:00
test_origin_validator.py Add API anti-abuse hardening: disable docs in prod, origin validator, exception handler 2026-02-08 20:06:46 +00:00
test_passkey_error_handling.py Add security regression tests for all hardening fixes 2026-02-08 19:42:53 +00:00
test_poi_validation.py Add security regression tests for all hardening fixes 2026-02-08 19:42:53 +00:00
test_query.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_query_splitter.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_rate_limiter.py Add security regression tests for all hardening fixes 2026-02-08 19:42:53 +00:00
test_redis_lock.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_repository.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_route_calculator.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_route_serializer.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_routing.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_schedule_config.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_security_headers.py Add API anti-abuse hardening: disable docs in prod, origin validator, exception handler 2026-02-08 20:06:46 +00:00
test_task_service.py Add security regression tests for all hardening fixes 2026-02-08 19:42:53 +00:00
test_throttle_detection.py Flatten repo structure: move crawler/ to root, remove vqa/ and immoweb/ 2026-02-07 23:01:20 +00:00
test_unhandled_exception.py Add API anti-abuse hardening: disable docs in prod, origin validator, exception handler 2026-02-08 20:06:46 +00:00