def test_out_of_bounds_tax_rate_raises_exceptions(self): a_payment = PaymentFactory() with self.assertRaises(ValidationError): a_payment.tax_rate = -0.3 a_payment.full_clean()