# Path: app/modules/users/schemas.py
# class BaseUserSchema(ModelSchema):
#     class Meta:
# class DetailedUserSchema(BaseUserSchema):
#     class Meta(BaseUserSchema.Meta):
# class UserSignupFormSchema(Schema):


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



def test_BaseUserSchema_dump_empty_input():
    dumped_result = schemas.BaseUserSchema().dump({})
    assert dumped_result.errors == {}
    assert dumped_result.data == {}

def test_BaseUserSchema_dump_user_instance(user_instance):
    user_instance.password = "password"
    dumped_result = schemas.BaseUserSchema().dump(user_instance)
    assert dumped_result.errors == {}
    assert 'password' not in dumped_result.data
    assert set(dumped_result.data.keys()) == {
        'id',
        'username',
        'first_name',
        'middle_name',
        'last_name'
    }

def test_DetailedUserSchema_dump_user_instance(user_instance):
    user_instance.password = "password"

# Path: app/modules/users/schemas.py
# class BaseUserSchema(ModelSchema):
#     class Meta:
# class DetailedUserSchema(BaseUserSchema):
#     class Meta(BaseUserSchema.Meta):
# class UserSignupFormSchema(Schema):


# Path: tests/modules/users/test_schemas.py
from app.modules.users import schemas

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



def test_BaseUserSchema_dump_empty_input():
    dumped_result = schemas.BaseUserSchema().dump({})
    assert dumped_result.errors == {}
    assert dumped_result.data == {}

def test_BaseUserSchema_dump_user_instance(user_instance):
    user_instance.password = "password"
    dumped_result = schemas.BaseUserSchema().dump(user_instance)
    assert dumped_result.errors == {}
    assert 'password' not in dumped_result.data
    assert set(dumped_result.data.keys()) == {
        'id',
        'username',
        'first_name',
        'middle_name',
        'last_name'
    }

def test_DetailedUserSchema_dump_user_instance(user_instance):
    user_instance.password = "password"

    dumped_result = schemas.DetailedUserSchema().dump(user_instance)