Permalink
Browse files

Merge tag 'v1.0.2'

  • Loading branch information...
tswicegood committed May 11, 2012
2 parents f751398 + 4e63e69 commit 3c2227a6bba913b609f550368c95ed9757dd1ced
Showing with 4 additions and 0 deletions.
  1. +1 −0 armstrong/apps/donations/forms.py
  2. +3 −0 armstrong/apps/donations/tests/forms.py
@@ -144,6 +144,7 @@ def is_valid(self, *args, **kwargs):
if not r and self.fields_to_strip:
empty_values = [""] * len(self.fields_to_strip)
new_data = dict(zip(self.fields_to_strip, empty_values))
+ self.data = copy(self.data)
self.data.update(new_data)
return r
@@ -1,5 +1,7 @@
+from django.http import QueryDict
import fudge
import random
+from urllib import urlencode
from ._utils import TestCase
from .. import constants
@@ -304,6 +306,7 @@ def get_invalid_form(self):
def assert_value_is_empty(self, field):
form = self.get_invalid_form()
+ form.data = QueryDict(urlencode(form.data))
form.fields_to_strip = ["card_number", "ccv_code"]
self.assertFalse(form.is_valid())
self.assertEqual("", form[field].value())

0 comments on commit 3c2227a

Please sign in to comment.