-
Notifications
You must be signed in to change notification settings - Fork 5
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
d96734b
commit 08eba03
Showing
1 changed file
with
0 additions
and
21 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 |
---|---|---|
|
@@ -11,25 +11,4 @@ def test_generate_password(): | |
assert type(password) is str | ||
|
||
|
||
@pytest.mark.usefixtures(u'clean_db', u'clean_index') | ||
def test_activate_user_if_deleted(): | ||
user = factories.User() | ||
user = model.User.get(user[u'name']) | ||
user.delete() | ||
h.activate_user_if_deleted(user) | ||
assert not user.is_deleted() | ||
|
||
|
||
@pytest.mark.usefixtures(u'clean_db') | ||
def test_ensure_unique_user_name_existing_user(): | ||
|
||
user = factories.User( | ||
name='existing-user', | ||
email=u'[email protected]' | ||
) | ||
|
||
user_name = h.ensure_unique_username_from_email(user['email']) | ||
|
||
assert user_name != user['email'].split('@')[0] | ||
assert user_name.startswith(user['email'].split('@')[0]) | ||
|