Files
FabledSteward/tests/test_models.py
T
bvandeusenandClaude Opus 5.5 766eef04c5 test: the user model and session refresh carry time_zone (milestone 490)
Run 8736: test_user_model_fields listed the columns without time_zone, and
the session-refresh fixture's users had no time_zone attribute. The refresh
test now also asserts a zone set on the Account page reaches the session.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 08:00:32 -04:00

13 lines
449 B
Python

from steward.models.users import User, UserRole
def test_user_model_fields():
"""User model has all required fields."""
cols = {c.key for c in User.__table__.columns}
assert cols == {"id", "username", "email", "password_hash", "role", "created_at", "is_active",
"auth_source", "external_id", "time_zone"}
def test_user_role_enum():
assert set(UserRole) == {UserRole.admin, UserRole.operator, UserRole.viewer}