feat: User model and initial Alembic migration

This commit is contained in:
2026-03-17 18:52:01 -04:00
parent 9205e1bcf1
commit ff8489f758
7 changed files with 156 additions and 1 deletions
+12
View File
@@ -0,0 +1,12 @@
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}