-
Notifications
You must be signed in to change notification settings - Fork 426
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent deleted users from logging in
- Loading branch information
Showing
2 changed files
with
11 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,6 +77,16 @@ def test_fetch_for_login_by_email_not_activated(self, svc): | |
with pytest.raises(UserNotActivated): | ||
svc.fetch_for_login("[email protected]") | ||
|
||
def test_fetch_for_login_by_username_deleted(self, svc, factories): | ||
user = factories.User(deleted=True) | ||
|
||
assert svc.fetch_for_login(user.username) is None | ||
|
||
def test_fetch_for_login_by_email_deleted(self, svc, factories): | ||
user = factories.User(deleted=True) | ||
|
||
assert svc.fetch_for_login(user.email) is None | ||
|
||
def test_update_preferences_tutorial_enable(self, svc, factories): | ||
user = factories.User.build(sidebar_tutorial_dismissed=True) | ||
|
||
|