コード例 #1
0
 def test_password_is_empty(self):
     self.assertEqual(app.validatePassword(""),
                      "Password cannot be empty!")
コード例 #2
0
 def test_password_has_spaces(self):
     self.assertEqual(app.validatePassword("Password 1"),
                      "Password cannot contain spaces!")
コード例 #3
0
 def test_password_is_valid(self):
     self.assertTrue(app.validatePassword("Password"))
コード例 #4
0
 def test_password_has_less_then_5_chars(self):
     self.assertEqual(app.validatePassword("abcd"),
                      "Password has to have 5 characters at least!")