This repository has been archived by the owner on Jan 3, 2024. It is now read-only.
-
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.
- Loading branch information
1 parent
558624f
commit bd2b726
Showing
3 changed files
with
39 additions
and
19 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 |
---|---|---|
@@ -1,18 +1,10 @@ | ||
from django.test import TestCase | ||
|
||
from .admin import UserAdmin | ||
from .models import User | ||
from apps.users.admin import UserAdmin | ||
from apps.users.models import User | ||
|
||
|
||
class UserModelTestCase(TestCase): | ||
def test_user_fields(self) -> None: | ||
self.user_data = { | ||
"email": "[email protected]", | ||
"username": "user_test", | ||
"password": "testpassword", | ||
} | ||
self.user = User.objects.create(**self.user_data) | ||
|
||
def test_username_field_is_email(self) -> None: | ||
self.assertEqual(User().USERNAME_FIELD, "email") | ||
|
||
|