mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-04 05:53:43 +00:00 
			
		
		
		
	billing: Remove references to legacy stripe_fixtures.json.
This commit is contained in:
		@@ -189,16 +189,8 @@ class StripeTest(ZulipTestCase):
 | 
				
			|||||||
    def setUp(self, mock3: Mock, mock2: Mock, mock1: Mock) -> None:
 | 
					    def setUp(self, mock3: Mock, mock2: Mock, mock1: Mock) -> None:
 | 
				
			||||||
        call_command("setup_stripe")
 | 
					        call_command("setup_stripe")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        # legacy
 | 
					 | 
				
			||||||
        self.token = 'token'
 | 
					        self.token = 'token'
 | 
				
			||||||
        # The values below should be copied from stripe_fixtures.json
 | 
					 | 
				
			||||||
        self.stripe_customer_id = 'cus_D7OT2jf5YAtZQL'
 | 
					 | 
				
			||||||
        self.customer_created = 1529990750
 | 
					 | 
				
			||||||
        self.stripe_coupon_id = Coupon.objects.get(percent_off=85).stripe_coupon_id
 | 
					 | 
				
			||||||
        self.stripe_plan_id = 'plan_Do3xCvbzO89OsR'
 | 
					 | 
				
			||||||
        self.subscription_created = 1529990751
 | 
					 | 
				
			||||||
        self.quantity = 8
 | 
					        self.quantity = 8
 | 
				
			||||||
 | 
					 | 
				
			||||||
        self.signed_seat_count, self.salt = sign_string(str(self.quantity))
 | 
					        self.signed_seat_count, self.salt = sign_string(str(self.quantity))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def get_signed_seat_count_from_response(self, response: HttpResponse) -> Optional[str]:
 | 
					    def get_signed_seat_count_from_response(self, response: HttpResponse) -> Optional[str]:
 | 
				
			||||||
@@ -594,8 +586,7 @@ class StripeTest(ZulipTestCase):
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        # Customer, but no billing relationship; check that we are still redirected to /upgrade
 | 
					        # Customer, but no billing relationship; check that we are still redirected to /upgrade
 | 
				
			||||||
        Customer.objects.create(
 | 
					        Customer.objects.create(
 | 
				
			||||||
            realm=user.realm, stripe_customer_id=self.stripe_customer_id,
 | 
					            realm=user.realm, stripe_customer_id='cus_123', has_billing_relationship=False)
 | 
				
			||||||
            has_billing_relationship=False)
 | 
					 | 
				
			||||||
        response = self.client_get("/billing/")
 | 
					        response = self.client_get("/billing/")
 | 
				
			||||||
        self.assertEqual(response.status_code, 302)
 | 
					        self.assertEqual(response.status_code, 302)
 | 
				
			||||||
        self.assertEqual('/upgrade/', response.url)
 | 
					        self.assertEqual('/upgrade/', response.url)
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user