Exemplo n.º 1
0
 def test_validates(self):
     """Should validate if it has a name.
     """
     u = User(name="valid")
     u.validate()
Exemplo n.º 2
0
 def test_requires_name(self):
     """Should not validate without name.
     """
     u = User()
     with self.assertRaises(ShieldException):
         u.validate()