コード例 #1
0
ファイル: testAccounts.py プロジェクト: noriakioji/QADDA
 def testPwdFail(self):
     r = Account.authenticate("*****@*****.**", "testpwd213213")
     self.assertEqual(r, {Account.FAIL: {Account.INVALID_PASSWORD:Account.errors[Account.INVALID_PASSWORD]}})
コード例 #2
0
ファイル: testAccounts.py プロジェクト: noriakioji/QADDA
 def testLoginSuccess(self):
     r = Account.authenticate("*****@*****.**", "testpwd")
     # Not too sure if they gives the same ID.
     auth = authenticate(username="******", password="******")
     # self.assertEqual(r, {0: [1]})
     self.assertEqual(r.keys()[0], Account.SUCCESS)
コード例 #3
0
ファイル: testAccounts.py プロジェクト: noriakioji/QADDA
 def testEmailFail(self):
     # Check the authenticate.
     r = Account.authenticate("*****@*****.**", "testpwd")
     # How to get the user.id ? I'll check if success first.
     self.assertEqual(r, {Account.FAIL: {Account.INVALID_UNAME_EMAIL:Account.errors[Account.INVALID_UNAME_EMAIL]}})