Closed denisvolokh closed 5 years ago
Looked at the source code and found that mixer is just saving the object.
I can hash password by myself:
from django.contrib.auth.hashers import make_password
user = mixer.blend(
get_user_model(),
password=make_password(TEST_PASSWORD)
)
Looked at the source code and found that mixer is just saving the object.
I can hash password by myself:
from django.contrib.auth.hashers import make_password user = mixer.blend( get_user_model(), password=make_password(TEST_PASSWORD) )
You may set it callable
user = mixer.blend(User, password=lambda: make_password(TEST_PASSWORD))
Hi,
The user object created with blend function cannot be authenticated with client.login
What is the right way to make an authenticated user?
Thanks, Denis