test: e2e + unit tests for supervisor, proxy, and feature flags
- test_supervisor.py: 28 tests covering load_workflows, resolve_schedule, is_due, topological_waves, and proxy round-robin / sticky selection - test_feature_flags.py: 31 tests covering migration 0019, is_flag_enabled, feature_gate decorator, admin toggle routes, and full toggle e2e flows - conftest.py: seed feature flags with production defaults (markets=1, others=0) so all routes behave consistently in tests - Fix is_flag_enabled bug: replace non-existent db.execute_fetchone() with fetch_one() helper - Update 4 test_waitlist / test_businessplan tests that relied on WAITLIST_MODE patches — now enable the relevant DB flag instead Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -255,6 +255,10 @@ class TestExportRoutes:
|
||||
assert resp.status_code == 302
|
||||
|
||||
async def test_export_page_shows_scenarios(self, auth_client, db, scenario):
|
||||
await db.execute(
|
||||
"INSERT OR REPLACE INTO feature_flags (name, enabled, description) VALUES ('planner_export', 1, '')"
|
||||
)
|
||||
await db.commit()
|
||||
resp = await auth_client.get("/en/planner/export")
|
||||
assert resp.status_code == 200
|
||||
html = (await resp.data).decode()
|
||||
|
||||
Reference in New Issue
Block a user