central/tests
Matt Johnson ff3d9bb3c3 chore(lint-cleanup): remove 10 pre-existing ruff issues in 4 test files
Cleans up unused imports and dead locals flagged by ruff in the test
files PR #50 (M-b) touched. Tests-only; no production code, no service
restart.

- test_supervisor_hotreload.py: drop unused AsyncMock/patch imports,
  dead expected_wait/expected_next_poll locals, and two dead
  state = AdapterState(...) blocks plus their now-orphaned local imports
- test_supervisor_integration.py: drop unused asyncio/patch/pytest_asyncio
  imports and AdapterState from two function-local imports

ruff tests/ 92 -> 82 (the 4 named files now 0; all other files unchanged).
Full suite: 590 passed, 1 skipped (central and unprivileged zvx).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 18:20:18 +00:00
..
fixtures feat(2-G): USGS NWIS adapter (OGC API) + CENTRAL_HYDRO stream 2026-05-19 16:50:21 +00:00
__init__.py
conftest.py chore(M): make enrichment-cache path test-hermetic via conftest autouse fixture 2026-05-21 14:23:31 +00:00
README.md
test_adapters.py fix(4-1): resolve api_key alias from per-adapter settings, not class attr 2026-05-19 23:08:11 +00:00
test_api_key_resolver.py fix(4-1): resolve api_key alias from per-adapter settings, not class attr 2026-05-19 23:08:11 +00:00
test_api_keys.py
test_apply_enrichment_coordless.py fix(3-M.b): apply_enrichment always attaches _enriched for declared adapters 2026-05-21 04:04:25 +00:00
test_archive_multi_stream.py feat(2-E.5): single-source-of-truth stream registry 2026-05-19 07:37:01 +00:00
test_audit.py
test_auth.py
test_backend_settings_schema.py fix(3-L.5): per-backend settings schemas (fixes build_enrichers TypeError) 2026-05-20 23:10:10 +00:00
test_bootstrap_config.py
test_config_source.py chore(M-b): clear get_settings lru_cache in test fixtures (fixes order-dependent crypto failures + 3 latent siblings) 2026-05-21 15:51:51 +00:00
test_config_store.py chore(M-b): clear get_settings lru_cache in test fixtures (fixes order-dependent crypto failures + 3 latent siblings) 2026-05-21 15:51:51 +00:00
test_consumer_doc.py docs(2-H): consumer integration spec — docs/CONSUMER-INTEGRATION.md (#38) 2026-05-19 14:33:51 -06:00
test_crypto.py
test_csrf_handler.py
test_csrf_race_condition.py
test_dashboard.py feat(2-E.5): single-source-of-truth stream registry 2026-05-19 07:37:01 +00:00
test_enrichment_config_plumbing.py fix(3-L.5): per-backend settings schemas (fixes build_enrichers TypeError) 2026-05-20 23:10:10 +00:00
test_enrichment_framework.py feat(3-J): enrichment framework + GeocoderEnricher + NoOpBackend + FIRMS pilot 2026-05-20 04:39:49 +00:00
test_enrichment_locations_coverage.py feat(3-L.a): finish enrichment_locations across adapters 2026-05-21 01:48:23 +00:00
test_eonet.py feat(2-F): NASA EONET disaster adapter 2026-05-19 15:35:25 +00:00
test_events_adapter_column.py
test_events_feed.py
test_events_feed_frontend.py feat(L-c): operator /events table polish — readable Time, Location, Subject, Adapter columns; sortable; plain-language summaries 2026-05-21 07:05:20 +00:00
test_firms.py feat(3-K.5): operator-settable EnrichmentConfig (config plumbing) 2026-05-20 18:52:22 +00:00
test_form_descriptors.py
test_gdacs.py
test_geocoder_enricher.py feat(3-J): enrichment framework + GeocoderEnricher + NoOpBackend + FIRMS pilot 2026-05-20 04:39:49 +00:00
test_gui_scaffold.py
test_inciweb.py
test_models.py
test_navi_backend.py feat(3-K.5): operator-settable EnrichmentConfig (config plumbing) 2026-05-20 18:52:22 +00:00
test_nominatim_backend.py feat(3-K): real geocoder backends + producer-doc reframe + consumer-doc enrichment 2026-05-20 16:10:44 +00:00
test_nwis.py feat(2-G.5): preview_for_settings framework hook + NWIS opt-in 2026-05-19 17:34:35 +00:00
test_nws_normalization.py
test_photon_backend.py feat(3-K): real geocoder backends + producer-doc reframe + consumer-doc enrichment 2026-05-20 16:10:44 +00:00
test_preview_hook.py fix(2-G.5): preview_for_settings contract in adapter docstring + distinguish [] from None 2026-05-19 17:55:39 +00:00
test_producer_doc.py feat(3-K): real geocoder backends + producer-doc reframe + consumer-doc enrichment 2026-05-20 16:10:44 +00:00
test_region_picker.py
test_requires_api_key.py
test_session_auth.py
test_setup_gate.py
test_stream_registry.py feat(2-E.5): single-source-of-truth stream registry 2026-05-19 07:37:01 +00:00
test_streams.py
test_supervisor_hotreload.py chore(lint-cleanup): remove 10 pre-existing ruff issues in 4 test files 2026-05-21 18:20:18 +00:00
test_supervisor_integration.py chore(lint-cleanup): remove 10 pre-existing ruff issues in 4 test files 2026-05-21 18:20:18 +00:00
test_swpc.py
test_usgs_quake.py
test_wfigs.py
test_wizard.py

Central Tests

Test Database

Some tests (notably test_config_store.py) require a real PostgreSQL database. By default, tests connect to:

postgresql://central_test:testpass@localhost/central_test

If your test database uses different credentials, set the CENTRAL_TEST_DB_DSN environment variable:

export CENTRAL_TEST_DB_DSN="postgresql://myuser:mypass@localhost/mydb"
uv run pytest tests/test_config_store.py