@@ -1014,43 +1014,43 @@ def test_customer_subscription_updated_sets_free_and_deactivates_all_repos_if_in
10141014 invoice_settings = {"default_payment_method" : "pm_1LhiRsGlVGuVgOrkQguJXdeV" },
10151015 )
10161016
1017- @patch ("billing.views.StripeWebhookHandler._has_unverified_initial_payment_method" )
1018- def test_customer_subscription_updated_payment_failed (
1019- self , has_unverified_initial_payment_method_mock
1020- ):
1021- has_unverified_initial_payment_method_mock .return_value = False
1022- self .owner .delinquent = False
1023- self .owner .save ()
1024-
1025- self ._send_event (
1026- payload = {
1027- "type" : "customer.subscription.updated" ,
1028- "data" : {
1029- "object" : {
1030- "id" : self .owner .stripe_subscription_id ,
1031- "customer" : self .owner .stripe_customer_id ,
1032- "plan" : {"id" : "?" },
1033- "metadata" : {"obo_organization" : self .owner .ownerid },
1034- "quantity" : 20 ,
1035- "status" : "active" ,
1036- "schedule" : None ,
1037- "default_payment_method" : "pm_1LhiRsGlVGuVgOrkQguJXdeV" ,
1038- "pending_update" : {
1039- "expires_at" : 1571194285 ,
1040- "subscription_items" : [
1041- {
1042- "id" : "si_09IkI4u3ZypJUk5onGUZpe8O" ,
1043- "price" : "price_CBb6IXqvTLXp3f" ,
1044- }
1045- ],
1046- },
1047- }
1048- },
1049- }
1050- )
1051-
1052- self .owner .refresh_from_db ()
1053- assert self .owner .delinquent == True
1017+ # @patch("billing.views.StripeWebhookHandler._has_unverified_initial_payment_method")
1018+ # def test_customer_subscription_updated_payment_failed(
1019+ # self, has_unverified_initial_payment_method_mock
1020+ # ):
1021+ # has_unverified_initial_payment_method_mock.return_value = False
1022+ # self.owner.delinquent = False
1023+ # self.owner.save()
1024+
1025+ # self._send_event(
1026+ # payload={
1027+ # "type": "customer.subscription.updated",
1028+ # "data": {
1029+ # "object": {
1030+ # "id": self.owner.stripe_subscription_id,
1031+ # "customer": self.owner.stripe_customer_id,
1032+ # "plan": {"id": "?"},
1033+ # "metadata": {"obo_organization": self.owner.ownerid},
1034+ # "quantity": 20,
1035+ # "status": "active",
1036+ # "schedule": None,
1037+ # "default_payment_method": "pm_1LhiRsGlVGuVgOrkQguJXdeV",
1038+ # "pending_update": {
1039+ # "expires_at": 1571194285,
1040+ # "subscription_items": [
1041+ # {
1042+ # "id": "si_09IkI4u3ZypJUk5onGUZpe8O",
1043+ # "price": "price_CBb6IXqvTLXp3f",
1044+ # }
1045+ # ],
1046+ # },
1047+ # }
1048+ # },
1049+ # }
1050+ # )
1051+
1052+ # self.owner.refresh_from_db()
1053+ # assert self.owner.delinquent == True
10541054
10551055 @patch ("billing.views.StripeWebhookHandler._has_unverified_initial_payment_method" )
10561056 @patch ("services.billing.stripe.PaymentMethod.attach" )
0 commit comments