예제 #1
0
 def _make(**kwargs):
     kwargs.setdefault("name", "Team%d" % count[0])
     kwargs.setdefault("password", "Password%d" % count[0])
     kwargs.setdefault("email", "*****@*****.**" % count[0])
     kwargs.setdefault("country_id", countries[0].id)
     t = Team(**kwargs)
     t._real_password = "******" % count[0]
     count[0] += 1
     return t
예제 #2
0
 def test_validate_password(self):
     t = Team(password="******")
     assert t.password
     assert t.validate_password("Test123")
     assert not t.validate_password("Test12")
     assert not t.validate_password("Test123 ")
     assert not t.validate_password("Test12 3")
     assert not t.validate_password(" Test123")
     assert not t.validate_password("test123")