@@ -1666,17 +1666,17 @@ def test_sync_customer_purged_remotely_not_locally(self, RetrieveMock, SyncPayme
1666
1666
self .assertFalse (SyncSubscriptionMock .called )
1667
1667
self .assertTrue (PurgeLocalMock .called )
1668
1668
1669
- @patch ("pinax. stripe.actions.invoices.sync_invoice_from_stripe_data " )
1669
+ @patch ("stripe.Invoice.auto_paging_iter " )
1670
1670
@patch ("stripe.Customer.retrieve" )
1671
- def test_sync_invoices_for_customer (self , RetreiveMock , SyncMock ):
1672
- RetreiveMock (). invoices (). data = [Mock ()]
1671
+ def test_sync_invoices_for_customer (self , RetrieveMock , SyncMock ):
1672
+ RetrieveMock . return_value = [Mock ()]
1673
1673
invoices .sync_invoices_for_customer (self .customer )
1674
1674
self .assertTrue (SyncMock .called )
1675
1675
1676
- @patch ("pinax. stripe.actions.charges.sync_charge_from_stripe_data " )
1676
+ @patch ("stripe.Charge.auto_paging_iter " )
1677
1677
@patch ("stripe.Customer.retrieve" )
1678
- def test_sync_charges_for_customer (self , RetreiveMock , SyncMock ):
1679
- RetreiveMock (). charges (). data = [Mock ()]
1678
+ def test_sync_charges_for_customer (self , RetrieveMock , SyncMock ):
1679
+ RetrieveMock . return_value = [Mock ()]
1680
1680
charges .sync_charges_for_customer (self .customer )
1681
1681
self .assertTrue (SyncMock .called )
1682
1682
0 commit comments