feat: add UserFactory

This commit is contained in:
Egor 2020-07-03 13:41:47 +05:00
parent 6f53f15577
commit e0baed8eee
14 changed files with 136 additions and 65 deletions

View file

View file

View file

13
tests/factories/user.py Normal file
View file

@ -0,0 +1,13 @@
import factory
from aiogram.api.types import User
class UserFactory(factory.Factory):
class Meta:
model = User
id = factory.Sequence(lambda n: n)
first_name = factory.Sequence(lambda n: f"First name #{n}")
last_name = factory.Sequence(lambda n: f"Last name #{n}")
is_bot = False