Vladyslav Fedoriuk 6484b85956 Refactor the models and add a mapper
- A new mapper allows to create database repositories from the SourceGraph data
2023-08-15 13:17:14 +02:00

13 lines
384 B
Python

"""Factories for creating test data."""
from polyfactory.factories.pydantic_factory import ModelFactory
from polyfactory.pytest_plugin import register_fixture
from app.scraper.models import SourceGraphRepoData
@register_fixture
class SourceGraphRepoDataFactory(ModelFactory[SourceGraphRepoData]):
"""Factory for creating RepoCreateData."""
__model__ = SourceGraphRepoData