refactor: update imports fabledscryer → roundtable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-13 17:13:55 -04:00
parent 8aad2ab43d
commit 94a35da86e
45 changed files with 147 additions and 147 deletions
+6 -6
View File
@@ -1,7 +1,7 @@
import pytest
import bcrypt
from unittest.mock import AsyncMock, patch
from fabledscryer.models.users import User, UserRole
from roundtable.models.users import User, UserRole
def make_user(role=UserRole.admin):
@@ -23,7 +23,7 @@ async def test_login_page_returns_200(client):
@pytest.mark.asyncio
async def test_login_redirects_to_setup_when_no_users(client, app):
with patch("fabledscryer.auth.routes.get_user_count", new=AsyncMock(return_value=0)):
with patch("roundtable.auth.routes.get_user_count", new=AsyncMock(return_value=0)):
response = await client.get("/login")
assert response.status_code == 302
assert "/setup" in response.headers["Location"]
@@ -32,8 +32,8 @@ async def test_login_redirects_to_setup_when_no_users(client, app):
@pytest.mark.asyncio
async def test_login_success_redirects_to_dashboard(client, app):
user = make_user()
with patch("fabledscryer.auth.routes.get_user_count", new=AsyncMock(return_value=1)), \
patch("fabledscryer.auth.routes.get_user_by_username", new=AsyncMock(return_value=user)):
with patch("roundtable.auth.routes.get_user_count", new=AsyncMock(return_value=1)), \
patch("roundtable.auth.routes.get_user_by_username", new=AsyncMock(return_value=user)):
response = await client.post("/login", form={"username": "admin", "password": "password"})
assert response.status_code == 302
assert "/" in response.headers["Location"]
@@ -42,8 +42,8 @@ async def test_login_success_redirects_to_dashboard(client, app):
@pytest.mark.asyncio
async def test_login_failure_returns_400(client, app):
user = make_user()
with patch("fabledscryer.auth.routes.get_user_count", new=AsyncMock(return_value=1)), \
patch("fabledscryer.auth.routes.get_user_by_username", new=AsyncMock(return_value=user)):
with patch("roundtable.auth.routes.get_user_count", new=AsyncMock(return_value=1)), \
patch("roundtable.auth.routes.get_user_by_username", new=AsyncMock(return_value=user)):
response = await client.post("/login", form={"username": "admin", "password": "wrong"})
assert response.status_code == 400