Files
FabledSteward/tests/test_models.py
T

13 lines
405 B
Python

import pytest
from fablednetmon.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"}
def test_user_role_enum():
assert set(UserRole) == {UserRole.admin, UserRole.operator, UserRole.viewer}