feat(testing): set password for user imported with raw password

This commit is contained in:
Benoit Suttor 2020-07-16 13:57:00 +02:00
parent 9ddaf8f309
commit c1bf8135c3
1 changed files with 2 additions and 0 deletions

View File

@ -316,6 +316,8 @@ class Command(BaseCommand):
}
user, created = User.objects.get_or_create(**kwargs)
if created:
user.set_password(defaults["password"])
user.save()
self.info(self.style.SUCCESS("CREATED"))
else:
modified = False