def test_validate_id_negative(self): """ Assumptions: - given id is not Integer (String instead) """ negative_id = "1" with self.assertRaisesRegex(ServerTypeIdNotValidError, "must be Integer"): ServerTypeOp.validate_id(negative_id)
def test_validate_id_positive(self): """ Assumptions: - given id is Integer """ positive_id = 1 try: ServerTypeOp.validate_id(positive_id) except ServerTypeIdNotValidError: self.fail("ServerTypeIdNotValidError raised.")