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>
13 lines
449 B
Python
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}
|