# Path: app/modules/users/models.py
# def _get_is_static_role_property(role_name, static_role):
#     def _is_static_role_property(self):
#     def _is_static_role_property(self, value):
#         def mask(self):
#         def title(self):
#     def __repr__(self):
#     def has_static_role(self, role):
#     def set_static_role(self, role):
#     def unset_static_role(self, role):
#     def check_owner(self, user):
#     def is_authenticated(self):
#     def is_anonymous(self):
#     def find_with_password(cls, username, password):
# class User(db.Model, Timestamp):
#     class StaticRoles(enum.Enum):
#         INTERNAL = (0x8000, "Internal")
#         ADMIN = (0x4000, "Admin")
#         REGULAR_USER = (0x2000, "Regular User")
#         ACTIVE = (0x1000, "Active Account")


import pytest
from app.modules.users import models
# encoding: utf-8
# pylint: disable=invalid-name,missing-docstring




def test_User_repr(user_instance):
    assert len(str(user_instance)) > 0


def test_User_auth(user_instance):
    assert user_instance.is_authenticated
    assert not user_instance.is_anonymous


@pytest.mark.parametrize(
    'init_static_roles,is_internal,is_admin,is_regular_user,is_active',
    [
        (_init_static_roles, _is_internal, _is_admin, _is_regular_user, _is_active) \
                for _init_static_roles in (
                    0,
                    (models.User.StaticRoles.INTERNAL.mask

# Path: app/modules/users/models.py
# def _get_is_static_role_property(role_name, static_role):
#     def _is_static_role_property(self):
#     def _is_static_role_property(self, value):
#         def mask(self):
#         def title(self):
#     def __repr__(self):
#     def has_static_role(self, role):
#     def set_static_role(self, role):
#     def unset_static_role(self, role):
#     def check_owner(self, user):
#     def is_authenticated(self):
#     def is_anonymous(self):
#     def find_with_password(cls, username, password):
# class User(db.Model, Timestamp):
#     class StaticRoles(enum.Enum):
#         INTERNAL = (0x8000, "Internal")
#         ADMIN = (0x4000, "Admin")
#         REGULAR_USER = (0x2000, "Regular User")
#         ACTIVE = (0x1000, "Active Account")


# Path: tests/modules/users/test_models.py
import pytest
from app.modules.users import models

# encoding: utf-8
# pylint: disable=invalid-name,missing-docstring




def test_User_repr(user_instance):
    assert len(str(user_instance)) > 0


def test_User_auth(user_instance):
    assert user_instance.is_authenticated
    assert not user_instance.is_anonymous


@pytest.mark.parametrize(
    'init_static_roles,is_internal,is_admin,is_regular_user,is_active',
    [
        (_init_static_roles, _is_internal, _is_admin, _is_regular_user, _is_active) \
                for _init_static_roles in (
                    0,
                    (models.User.StaticRoles.INTERNAL.mask

                        | models.User.StaticRoles.ADMIN.mask