api/app/factories/user_profile_factory.py

16 lines
447 B
Python

from app.factories import Factory, random_phone, random_string
from app.models.user_profile import UserProfile
class UserProfileFactory(Factory):
model = UserProfile
def definition(self) -> dict:
return {
"id": None,
"user_id": None,
"full_name": f"{random_string(6).title()} {random_string(8).title()}",
"phone": random_phone(),
"timezone": "Asia/Jakarta",
}