# Path: tests/fixtures/thief.py
# class Thief(object):
#     """Thief fake class"""
# 
#     def __init__(self, first_name, last_name):
#         """
#         Args:
#             first_name (str): thief first name
#             last_name (str): thief last name
#         """
#         self.first_name = first_name
#         self.last_name = last_name
# 
# Path: tests/fixtures/book.py
# class Book(object):
#     def __init__(self, title, authors):
#         self.title = title
#         self.authors = authors


import pytest
from lupin import Constant, fields as f, Mapper, Schema
from lupin.processors import strip, lower
from lupin.errors import InvalidDocument, InvalidType, MissingKey, ValidationError
from tests.fixtures import Thief, Book
# coding: utf-8



@pytest.fixture
def mapper():
    return Mapper()


class TestConstructor(object):
    def test_generate_name_if_absent(self):
        schema = Schema({})
        assert schema.name.startswith("schema")


class TestLoad(object):
    def test_returns_a_thief(self, thief_schema, thief_data, mapper):

# Path: tests/fixtures/thief.py
# class Thief(object):
#     """Thief fake class"""
# 
#     def __init__(self, first_name, last_name):
#         """
#         Args:
#             first_name (str): thief first name
#             last_name (str): thief last name
#         """
#         self.first_name = first_name
#         self.last_name = last_name
# 
# Path: tests/fixtures/book.py
# class Book(object):
#     def __init__(self, title, authors):
#         self.title = title
#         self.authors = authors


# Path: tests/lupin/test_schema.py
import pytest
from lupin import Constant, fields as f, Mapper, Schema
from lupin.processors import strip, lower
from lupin.errors import InvalidDocument, InvalidType, MissingKey, ValidationError
from tests.fixtures import Thief, Book

# coding: utf-8



@pytest.fixture
def mapper():
    return Mapper()


class TestConstructor(object):
    def test_generate_name_if_absent(self):
        schema = Schema({})
        assert schema.name.startswith("schema")


class TestLoad(object):
    def test_returns_a_thief(self, thief_schema, thief_data, mapper):

        thief = thief_schema.load(Thief, thief_data, mapper)