Update formatting

This commit is contained in:
Bruno Alla 2020-01-23 17:52:17 +00:00
parent c231a267c9
commit fd43059e28

View File

@ -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: