Wire dashboard into app
- Add web_user, web_password, secret_key as optional params to create_app - Conditionally mount dashboard router when all three are set - Pass settings from main.py to create_app - Add tests for no dashboard/login routes when config absent Made-with: Cursor
This commit is contained in:
@@ -142,3 +142,13 @@ def test_show_by_episode(client, db):
|
||||
def test_show_by_episode_not_found(client):
|
||||
resp = client.get("/shows/by-episode/999")
|
||||
assert resp.status_code == 404
|
||||
|
||||
|
||||
def test_no_dashboard_routes_without_config(client):
|
||||
resp = client.get("/dashboard", follow_redirects=False)
|
||||
assert resp.status_code == 404
|
||||
|
||||
|
||||
def test_no_login_route_without_config(client):
|
||||
resp = client.get("/login")
|
||||
assert resp.status_code == 404
|
||||
|
||||
Reference in New Issue
Block a user