Skip to content
This repository was archived by the owner on Oct 15, 2020. It is now read-only.

Commit e1a2661

Browse files
author
philippe VESSIERE
committed
Fix #130 - Add User.username check.
1 parent 2cc7bb6 commit e1a2661

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ban/tests/auth/test_models.py

+7
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,10 @@ def test_user_password_is_hashed():
1010
user = models.User.get(models.User.id == user.id)
1111
assert user.password != password
1212
assert user.check_password(password)
13+
14+
15+
def test_user_get_username():
16+
username = 'Homer'
17+
user1 = UserFactory(username=username)
18+
user = models.User.get(models.User.id == user1.id)
19+
assert user.username == username

0 commit comments

Comments
 (0)