mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-23 01:57:03 +03:00
Update formatting
This commit is contained in:
parent
c231a267c9
commit
fd43059e28
|
@ -12,14 +12,18 @@ class UserFactory(DjangoModelFactory):
|
|||
|
||||
@post_generation
|
||||
def password(self, create: bool, extracted: Sequence[Any], **kwargs):
|
||||
password = extracted if extracted else Faker(
|
||||
"password",
|
||||
length=42,
|
||||
special_chars=True,
|
||||
digits=True,
|
||||
upper_case=True,
|
||||
lower_case=True,
|
||||
).generate(extra_kwargs={})
|
||||
password = (
|
||||
extracted
|
||||
if extracted
|
||||
else Faker(
|
||||
"password",
|
||||
length=42,
|
||||
special_chars=True,
|
||||
digits=True,
|
||||
upper_case=True,
|
||||
lower_case=True,
|
||||
).generate(extra_kwargs={})
|
||||
)
|
||||
self.set_password(password)
|
||||
|
||||
class Meta:
|
||||
|
|
Loading…
Reference in New Issue
Block a user