# Path: tests/test_utils.py
# def mock_uuid_generator():
#     """
#     Returns a generator object that creates UUID instances with a deterministic
#     and progressive value in the form of `00000000-0000-0000-0000-000000000001`
#     """
#     i = 1
#     while True:
#         yield uuid.UUID('00000000-0000-0000-0000-{:012d}'.format(i))
#         i += 1
# 
# class MockModelCreate:
#     """
#     Override callable class that goes in place of the Model.create()
#     classmethod and allows extra default custom parameters so test objects can
#     be predictable.
#     Defaulted attributes are `created_at`, with a static datetime and `uuid`
#     with a progressive uuid
#     """
# 
#     def __init__(self, cls):
#         self.original = cls.create
#         self.uuid_generator = mock_uuid_generator()
# 
#     def __call__(self, created_at=mock_datetime(), uuid=None, **query):
#         query['created_at'] = created_at
#         query['uuid'] = uuid or next(self.uuid_generator)
#         return self.original(**query)


import uuid
import pytest
import models
from tests.test_utils import mock_uuid_generator, MockModelCreate
"""
Pytest configuration module, required to setup fixtures and
other specific test configuration, and allow pytest to find and use them.
"""






@pytest.fixture(autouse=True, name='mockuuid4')
def mock_uuid(mocker):
    """
    Fixture to override the default uuid.uuid4 function to return a
    deterministic uuid instead of a random one.
    """

# Path: tests/test_utils.py
# def mock_uuid_generator():
#     """
#     Returns a generator object that creates UUID instances with a deterministic
#     and progressive value in the form of `00000000-0000-0000-0000-000000000001`
#     """
#     i = 1
#     while True:
#         yield uuid.UUID('00000000-0000-0000-0000-{:012d}'.format(i))
#         i += 1
# 
# class MockModelCreate:
#     """
#     Override callable class that goes in place of the Model.create()
#     classmethod and allows extra default custom parameters so test objects can
#     be predictable.
#     Defaulted attributes are `created_at`, with a static datetime and `uuid`
#     with a progressive uuid
#     """
# 
#     def __init__(self, cls):
#         self.original = cls.create
#         self.uuid_generator = mock_uuid_generator()
# 
#     def __call__(self, created_at=mock_datetime(), uuid=None, **query):
#         query['created_at'] = created_at
#         query['uuid'] = uuid or next(self.uuid_generator)
#         return self.original(**query)


# Path: tests/conftest.py
import uuid
import pytest
import models
from tests.test_utils import mock_uuid_generator, MockModelCreate

"""
Pytest configuration module, required to setup fixtures and
other specific test configuration, and allow pytest to find and use them.
"""






@pytest.fixture(autouse=True, name='mockuuid4')
def mock_uuid(mocker):
    """
    Fixture to override the default uuid.uuid4 function to return a
    deterministic uuid instead of a random one.
    """

    muuid = mock_uuid_generator()