Permalink
Browse files

Fixing rogue test case.

  • Loading branch information...
1 parent 9e407a2 commit 2b6ee7e3dfd5c39c183909170d836c7d25ee1107 @stevenwei committed Apr 21, 2010
Showing with 5 additions and 2 deletions.
  1. +3 −0 chargify.py
  2. +2 −2 test_chargify.py
View
@@ -78,6 +78,9 @@ def make_request(self, url, method, data, api_key):
return simplejson.loads(result)
class Chargify(object):
+ """
+ A client for the Chargify API.
+ """
api_key = ''
sub_domain = ''
path = []
View
@@ -111,7 +111,7 @@ def test_construct_request(self):
'{"subscription": {"product_handle": "my_product", "credit_card_attributes": {"expiration_month": "10", "full_number": "1", "expiration_year": "2020"}, "customer_attributes": {"first_name": "Joe", "last_name": "Blow", "email": "joe@example.com"}}}')
# Update
- result = self.chargify.subscriptions.update(data={
+ result = self.chargify.subscriptions.update(subscription_id=123,data={
'subscription':{
'credit_card_attributes':{
'full_number':'2',
@@ -120,7 +120,7 @@ def test_construct_request(self):
}
}
})
- self.assertResult(result,'https://subdomain.chargify.com/subscriptions.json','PUT',
+ self.assertResult(result,'https://subdomain.chargify.com/subscriptions/123.json','PUT',
'{"subscription": {"credit_card_attributes": {"expiration_month": "10", "full_number": "2", "expiration_year": "2030"}}}')
# Delete

0 comments on commit 2b6ee7e

Please sign in to comment.