コード例 #1
0
ファイル: test_models.py プロジェクト: chrismcginlay/eduduck
 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()
コード例 #2
0
ファイル: test_models.py プロジェクト: chrismcginlay/eduduck
 def test_out_of_bounds_fee_value_raises_exceptions(self):
     a_payment = PaymentFactory()
     with self.assertRaises(ValidationError):
         a_payment.fee_value = -0.3
         a_payment.full_clean()
コード例 #3
0
ファイル: test_models.py プロジェクト: chrismcginlay/eduduck
 def test_bogus_currency_raises_exceptions(self):
     a_payment = PaymentFactory()
     with self.assertRaises(ValidationError):
         a_payment.currency = 'potatoes'
         a_payment.full_clean()
コード例 #4
0
ファイル: test_models.py プロジェクト: chrismcginlay/eduduck
 def test_bogus_currency_raises_exceptions(self):
     a_payment = PaymentFactory()
     with self.assertRaises(ValidationError):
         a_payment.currency = 'potatoes'
         a_payment.full_clean()