コード例 #1
0
ファイル: authentication.py プロジェクト: pmatigakis/pagetags
def authenticate(username, password):
    return User.authenticate(username, password)
コード例 #2
0
ファイル: test_models.py プロジェクト: pmatigakis/pagetags
 def test_fail_to_authenticate_unknown_user(self):
     with self.app.app_context():
         self.assertFalse(User.authenticate("user2", "password"))
コード例 #3
0
ファイル: test_models.py プロジェクト: pmatigakis/pagetags
 def test_authenticate(self):
     with self.app.app_context():
         self.assertTrue(User.authenticate("user1", "password"))
コード例 #4
0
ファイル: test_models.py プロジェクト: pmatigakis/pagetags
 def test_fail_to_authenticate_with_invalid_password(self):
     with self.app.app_context():
         self.assertFalse(User.authenticate("user1", "password1"))