Exemplo n.º 1
0
 def test_validate_id_negative(self):
     """ Assumptions:
             - given id is not Integer (String instead)
     """
     negative_id = "1"
     with self.assertRaisesRegex(IpIdNotValidError, "must be Integer"):
         IpOp.validate_id(negative_id)
Exemplo n.º 2
0
 def test_validate_id_positive(self):
     """ Assumptions:
             - given id is Integer
     """
     positive_id = 1
     try:
         IpOp.validate_id(positive_id)
     except IpError:
         self.fail("Database operations error raised.")