mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
feat: add UserFactory
This commit is contained in:
parent
6f53f15577
commit
e0baed8eee
14 changed files with 136 additions and 65 deletions
0
tests/factories/chat_member.py
Normal file
0
tests/factories/chat_member.py
Normal file
0
tests/factories/inline_query.py
Normal file
0
tests/factories/inline_query.py
Normal file
0
tests/factories/message.py
Normal file
0
tests/factories/message.py
Normal file
13
tests/factories/user.py
Normal file
13
tests/factories/user.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue