Skip to content

Commit

Permalink
Updated test fixtures
Browse files Browse the repository at this point in the history
* Default BalanceTransaction and Charge description has changed
* network added to Charge.payment_method_details
  • Loading branch information
therefromhere committed Oct 12, 2019
1 parent 5c72755 commit a0380f5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"available_on": 1558569600,
"created": 1557995177,
"currency": "usd",
"description": "Invoice 7759B3BE-0001",
"description": "Subscription creation",
"exchange_rate": null,
"fee": 88,
"fee_details": [
Expand Down
3 changes: 2 additions & 1 deletion tests/fixtures/charge_ch_fakefakefakefakefake0001.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"created": 1557995177,
"currency": "usd",
"customer": "cus_6lsBvm5rJ0zyHc",
"description": "Invoice 7759B3BE-0001",
"description": "Subscription creation",
"destination": null,
"dispute": null,
"failure_code": null,
Expand Down Expand Up @@ -63,6 +63,7 @@
"funding": "credit",
"installments": null,
"last4": "4242",
"network": "visa",
"three_d_secure": null,
"wallet": null
},
Expand Down
10 changes: 3 additions & 7 deletions tests/test_charge.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,9 +199,7 @@ def test_sync_from_stripe_data(
self.assertEqual(False, charge.refunded)
self.assertEqual(True, charge.captured)
self.assertEqual(False, charge.disputed)
self.assertEqual(
"Invoice {}".format(FAKE_INVOICE["number"]), charge.description
)
self.assertEqual("Subscription creation", charge.description)
self.assertEqual(0, charge.amount_refunded)

self.assertEqual(self.customer.default_source.id, charge.source_id)
Expand Down Expand Up @@ -298,9 +296,7 @@ def test_sync_from_stripe_data_refunded_on_update(
self.assertEqual(True, charge_refunded.refunded)
self.assertEqual(True, charge_refunded.captured)
self.assertEqual(False, charge_refunded.disputed)
self.assertEqual(
"Invoice {}".format(charge.invoice.number), charge_refunded.description
)
self.assertEqual("Subscription creation", charge_refunded.description)
self.assertEqual(charge_refunded.amount, charge_refunded.amount_refunded)

charge_retrieve_mock.assert_not_called()
Expand Down Expand Up @@ -390,7 +386,7 @@ def test_sync_from_stripe_data_refunded(
self.assertEqual(True, charge.refunded)
self.assertEqual(True, charge.captured)
self.assertEqual(False, charge.disputed)
self.assertEqual("Invoice {}".format(charge.invoice.number), charge.description)
self.assertEqual("Subscription creation", charge.description)
self.assertEqual(charge.amount, charge.amount_refunded)

charge_retrieve_mock.assert_not_called()
Expand Down

0 comments on commit a0380f5

Please sign in to comment.