Permalink
Browse files

Fixup transaction resource for webpay updating

  • Loading branch information...
1 parent 59067b3 commit dfe4e3999540d71f56cf480bbfb8cd484464b275 @kumar303 kumar303 committed Jan 4, 2013
Showing with 6 additions and 5 deletions.
  1. +4 −3 lib/transactions/resources.py
  2. +2 −2 lib/transactions/tests/test_api.py
View
7 lib/transactions/resources.py
@@ -17,9 +17,10 @@ class TransactionResource(ModelResource):
class Meta(ModelResource.Meta):
queryset = Transaction.objects.filter()
fields = ['uuid', 'seller_product', 'amount', 'currency', 'provider',
- 'uid_support', 'type', 'status', 'related', 'notes']
- list_allowed_methods = ['get', 'post']
- allowed_methods = ['get']
+ 'uid_pay', 'uid_support', 'type', 'status', 'related',
+ 'notes']
+ list_allowed_methods = ['get', 'post', 'patch']
+ allowed_methods = ['get', 'put']
resource_name = 'transaction'
filtering = {
'uuid': 'exact',
View
4 lib/transactions/tests/test_api.py
@@ -23,8 +23,8 @@ def setUp(self):
self.detail_url = self.get_detail_url('transaction', self.trans.pk)
def test_list_allowed(self):
- self.allowed_verbs(self.list_url, ['get', 'post'])
- self.allowed_verbs(self.detail_url, ['get'])
+ self.allowed_verbs(self.list_url, ['get', 'post', 'patch'])
+ self.allowed_verbs(self.detail_url, ['get', 'put'])
def test_list(self):
res = self.client.get(self.list_url, data={'uuid': self.uuid})

0 comments on commit dfe4e39

Please sign in to comment.