-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from dimagi/ce/username
remove username field
- Loading branch information
Showing
4 changed files
with
17 additions
and
13 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
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
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 |
---|---|---|
|
@@ -31,7 +31,7 @@ def test_add(self, admin_client): | |
assert User.objects.filter(email="[email protected]").exists() | ||
|
||
def test_view_user(self, admin_client): | ||
user = User.objects.get(email="admin@example.com") | ||
user = User.objects.get(username="admin") | ||
url = reverse("admin:users_user_change", kwargs={"object_id": user.pk}) | ||
response = admin_client.get(url) | ||
assert response.status_code == 200 |
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 |
---|---|---|
|
@@ -43,13 +43,13 @@ def test_createsuperuser_command(): | |
out = StringIO() | ||
command_result = call_command( | ||
"createsuperuser", | ||
"--email", | ||
"--username", | ||
"[email protected]", | ||
interactive=False, | ||
stdout=out, | ||
) | ||
|
||
assert command_result is None | ||
assert out.getvalue() == "Superuser created successfully.\n" | ||
user = User.objects.get(email="[email protected]") | ||
user = User.objects.get(username="[email protected]") | ||
assert not user.has_usable_password() |