Dmitry Afanasyev 8266342214
add ban user action (#77)
* add ban user action

* fix tests

* send message through update.effective_message
2024-01-07 16:08:23 +03:00

21 lines
604 B
Python

import factory
from core.auth.models.users import User
from tests.integration.factories.utils import BaseModelFactory
class UserFactory(BaseModelFactory):
id = factory.Sequence(lambda n: n + 1)
email = factory.Faker("email")
username = factory.Faker("user_name", locale="en_EN")
first_name = factory.Faker("word")
last_name = factory.Faker("word")
ban_reason = factory.Faker("text", max_nb_chars=100)
hashed_password = factory.Faker("word")
is_active = True
is_superuser = False
created_at = factory.Faker("past_datetime")
class Meta:
model = User