# Path: virtool/fake/wrapper.py
# class FakerWrapper:
#     def __init__(self):
#         self.fake = Faker()
#         self.fake.seed_instance(0)
#         self.fake.add_provider(address)
#         self.fake.add_provider(misc)
#         self.fake.add_provider(lorem)
#         self.fake.add_provider(python)
#         self.fake.add_provider(date_time)
#         self.fake.add_provider(profile)
# 
#         self.country = self.fake.country
# 
#         self.text = self.fake.text
#         self.word = self.fake.word
#         self.words = self.fake.words
# 
#         self.integer = self.fake.pyint
#         self.list = self.fake.pylist
#         self.boolean = self.fake.pybool
#         self.profile = self.fake.profile
#         self.date_time = self.fake.date_time
#         self.random_element = self.fake.random_element
# 
#     def get_mongo_id(self) -> str:
#         """
#         Create a predictable, fake ID for MongoDB that imitates Virtool IDs.
# 
#         :return: a fake MongoDB ID
# 
#         """
#         return self.fake.password(length=8, special_chars=False)


from virtool.fake.wrapper import FakerWrapper
from virtool.otus.fake import create_fake_otus


async def test_create_fake_otus(dbi, snapshot, tmp_path):
    app = {"db": dbi, "data_path": tmp_path, "fake": FakerWrapper()}

    await create_fake_otus(app, "reference_1", "bob")


# Path: virtool/fake/wrapper.py
# class FakerWrapper:
#     def __init__(self):
#         self.fake = Faker()
#         self.fake.seed_instance(0)
#         self.fake.add_provider(address)
#         self.fake.add_provider(misc)
#         self.fake.add_provider(lorem)
#         self.fake.add_provider(python)
#         self.fake.add_provider(date_time)
#         self.fake.add_provider(profile)
# 
#         self.country = self.fake.country
# 
#         self.text = self.fake.text
#         self.word = self.fake.word
#         self.words = self.fake.words
# 
#         self.integer = self.fake.pyint
#         self.list = self.fake.pylist
#         self.boolean = self.fake.pybool
#         self.profile = self.fake.profile
#         self.date_time = self.fake.date_time
#         self.random_element = self.fake.random_element
# 
#     def get_mongo_id(self) -> str:
#         """
#         Create a predictable, fake ID for MongoDB that imitates Virtool IDs.
# 
#         :return: a fake MongoDB ID
# 
#         """
#         return self.fake.password(length=8, special_chars=False)


# Path: tests/otus/test_fake.py
from virtool.fake.wrapper import FakerWrapper
from virtool.otus.fake import create_fake_otus



async def test_create_fake_otus(dbi, snapshot, tmp_path):
    app = {"db": dbi, "data_path": tmp_path, "fake": FakerWrapper()}

    await create_fake_otus(app, "reference_1", "bob")


    assert await dbi.otus.find().to_list(None) == snapshot