This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

allow uid_pay through

  • Loading branch information...
Andy McKay
Andy McKay committed Jan 7, 2013
1 parent a1ac84a commit 7f5221e97874f1c1c33434a60920b189a3ff3e38
Showing with 6 additions and 0 deletions.
  1. +1 −0 lib/transactions/forms.py
  2. +5 −0 lib/transactions/tests/test_api.py
@@ -9,6 +9,7 @@ class UpdateForm(ParanoidForm):
notes = forms.CharField(required=False)
status = forms.ChoiceField(choices=[(v, v) for v in STATUSES.values()],
required=False)
+ uid_pay = forms.CharField(required=False)
def clean(self):
keys = set(self.data.keys()).difference(set(self.fields.keys()))
@@ -65,3 +65,8 @@ def test_patch_naughty(self):
res = self.client.patch(self.detail_url, data={'uuid': 5})
eq_(res.status_code, 400)
eq_(json.loads(res.content)['__all__'], ['Cannot alter fields: uuid'])
+
+ def test_patch_uid_pay(self):
+ res = self.client.patch(self.detail_url, data={'uid_pay': 'xyz'})
+ eq_(res.status_code, 202)
+ eq_(self.trans.reget().uid_pay, 'xyz')

0 comments on commit 7f5221e

Please sign in to comment.