From 3f6562c7fe79b961952014285c887d958e102906 Mon Sep 17 00:00:00 2001 From: Bo Peng <47236991+bioworkflows@users.noreply.github.com> Date: Sun, 19 Jan 2020 16:21:27 -0600 Subject: [PATCH] Honor passed password for UserFactory --- .../{{cookiecutter.project_slug}}/users/tests/factories.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/factories.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/factories.py index b5371366..290f7b41 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/factories.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/tests/factories.py @@ -12,7 +12,7 @@ class UserFactory(DjangoModelFactory): @post_generation def password(self, create: bool, extracted: Sequence[Any], **kwargs): - password = Faker( + password = extracted if extracted else Faker( "password", length=42, special_chars=True,