def test_validate_maximum(self): tm = TeaModel() tm.validate_maximum(1, 'count', 10) try: tm.validate_maximum(10, 'count', 1) assert False except Exception as e: self.assertEqual('count is greater than the maximum: 1', str(e))
def test_validate_maximum(self): tm = TeaModel() tm.validate_maximum(1, 10) self.assertRaises(Exception, tm.validate_maximum, num=10, maximum=1)