-
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.
Feito teste para garantir criação de usuário com email em minúsculo
close #15
- Loading branch information
renzo
committed
Jul 11, 2024
1 parent
fdc4635
commit 60f6bd3
Showing
4 changed files
with
18 additions
and
4 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 was deleted.
Oops, something went wrong.
Empty file.
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
from django.contrib.auth import get_user_model | ||
|
||
from devpro.base.manager import UserManager | ||
|
||
|
||
def test_user_has_customized_manager_instance(): | ||
User = get_user_model() | ||
assert isinstance(User.objects, UserManager) | ||
|
||
|
||
@pytest.mark.django_db | ||
def test_user_creation_with_lower_case_email(): | ||
User = get_user_model() | ||
user = User.objects.create_user(email='RenZo@dev,pro.br') | ||
assert user.email == 'renzo@dev,pro.br' |