-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✅ [#8] Test real TOTP token login flow
- Loading branch information
1 parent
caa4ed8
commit 0b4a324
Showing
2 changed files
with
9 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,12 @@ def user(db: None, django_user_model): | |
# the lookup is by username, so we can assume so as well. | ||
user = UserModel._default_manager.get_by_natural_key(username) | ||
except UserModel.DoesNotExist: | ||
user_data = {"email": "[email protected]"} | ||
user_data["password"] = "password" | ||
user_data["username"] = username | ||
user_data = { | ||
"email": "[email protected]", | ||
"password": "password", | ||
"username": username, | ||
"is_staff": True, | ||
} | ||
user = UserModel._default_manager.create_user(**user_data) | ||
return user | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters