fix(tests): update tests for lazy app loading and 302 redirect

- test_gui_scaffold.py: use standalone router instead of importing app
  to avoid triggering settings load during test collection
- test_setup_gate.py: expect 302 (not 307) for setup gate redirect

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matt Johnson 2026-05-17 06:14:25 +00:00
commit b1ba2d1863
2 changed files with 11 additions and 25 deletions

View file

@ -83,7 +83,7 @@ class TestSetupGateMiddleware:
client = TestClient(app, follow_redirects=False)
response = client.get("/")
assert response.status_code == 307
assert response.status_code == 302
assert response.headers["location"] == "/setup"
@pytest.mark.asyncio