0.1.0 boosted

This commit is contained in:
Waylon Walker 2024-04-06 11:26:46 -05:00
parent 126e90084e
commit f29c40d25e
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4
11 changed files with 181 additions and 22 deletions

View file

@ -0,0 +1,24 @@
from datetime import date, datetime
from typing import List, Union
from faker import Faker
from polyfactory.factories.pydantic_factory import ModelFactory
from pydantic import UUID4, BaseModel
faker = Faker()
class Person(BaseModel):
id: UUID4
name: str
birthday: Union[datetime, date]
phone_number: str
class PersonFactory(ModelFactory):
name = faker.name
phone_number = faker.phone_number
__model__ = Person
# result = PersonFactory.build()