feat: User model and initial Alembic migration
This commit is contained in:
@@ -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}
|
||||
Reference in New Issue
Block a user