import pytest
from django.contrib.auth import get_user_model

User = get_user_model()


@pytest.mark.django_db
class TestUserModel:
    def test_create_seeker(self):
        user = User.objects.create_user(
            username='seeker1', password='pass123', role='seeker'
        )
        assert user.role == 'seeker'
        assert user.is_seeker is True
        assert user.is_admin is False

    def test_create_admin(self):
        user = User.objects.create_user(
            username='admin1', password='pass123', role='admin'
        )
        assert user.is_admin is True

    def test_create_superadmin(self):
        user = User.objects.create_user(
            username='super1', password='pass123', role='superadmin'
        )
        assert user.is_superadmin is True
