Beispiel #1
0
 def test_clean_method(self):
     """
     Test that clean method validates expire date
     """
     form = PaymentForm()
     form.cleaned_data = {}
     with patch('salest.payments.forms.PaymentForm.validate_expire_date')\
                                                             as valid_date:
         form.clean()
         valid_date.assert_called_once_with()