-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fixes #1563 -- Use iexact mathing when querying users * Add .pytest_cache to gitignore * Make identifier non-optional
- Loading branch information
1 parent
ba39323
commit 8c65ade
Showing
3 changed files
with
19 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 |
---|---|---|
|
@@ -19,6 +19,7 @@ wheels/ | |
*.pyc | ||
.cache | ||
__pycache__/ | ||
.pytest_cache | ||
|
||
# Coverage | ||
.coverage | ||
|
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 |
---|---|---|
|
@@ -16,13 +16,28 @@ def test_get_from_username(self): | |
|
||
assert found == user | ||
|
||
def test_get_from_username_non_case_sensitive(self): | ||
user = UserFactory.create(username='TestUser') | ||
found = User.objects.get_from_username_or_email_or_phone( | ||
identifier='testuser' | ||
) | ||
|
||
assert found == user | ||
|
||
def test_get_from_email(self): | ||
user = UserFactory.create() | ||
found = User.objects.get_from_username_or_email_or_phone( | ||
identifier=user.email) | ||
|
||
assert found == user | ||
|
||
def test_get_from_email_non_case_sensitive(self): | ||
user = UserFactory.create(email='[email protected]') | ||
found = User.objects.get_from_username_or_email_or_phone( | ||
identifier='[email protected]') | ||
|
||
assert found == user | ||
|
||
def test_get_from_phone(self): | ||
user = UserFactory.create() | ||
found = User.objects.get_from_username_or_email_or_phone( | ||
|