Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
test_stripe: Fix weak URL testing.
Aman Agrawal906b96cdfc61
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.pyindex 671d2de66ab..48c76b7263a 100644--- a/corporate/tests/test_stripe.py+++ b/corporate/tests/test_stripe.py@@ -860,17 +860,17 @@ class StripeTest(StripeTestCase):response = self.client_get(f"/customer_portal/?tier={CustomerPlan.TIER_CLOUD_STANDARD}")self.assertEqual(response.status_code, 302)- self.assertTrue(response["Location"].startswith("https://billing.stripe.com"))+ self.assertTrue(response["Location"].startswith("https://billing.stripe.com/"))self.upgrade(invoice=True)response = self.client_get("/customer_portal/?return_to_billing_page=true")self.assertEqual(response.status_code, 302)- self.assertTrue(response["Location"].startswith("https://billing.stripe.com"))+ self.assertTrue(response["Location"].startswith("https://billing.stripe.com/"))response = self.client_get("/invoices/")self.assertEqual(response.status_code, 302)- self.assertTrue(response["Location"].startswith("https://billing.stripe.com"))+ self.assertTrue(response["Location"].startswith("https://billing.stripe.com/"))@mock_stripe()def test_upgrade_by_card_to_plus_plan(self, *mocks: Mock) -> None:@@ -7210,14 +7210,14 @@ class TestRemoteRealmBillingFlow(StripeTestCase, RemoteRealmBillingTestCase):f"{self.billing_session.billing_base_url}/invoices/", subdomain="selfhosting")self.assertEqual(response.status_code, 302)- self.assertTrue(response["Location"].startswith("https://billing.stripe.com"))+ self.assertTrue(response["Location"].startswith("https://billing.stripe.com/"))response = self.client_get(f"{self.billing_session.billing_base_url}/customer_portal/?return_to_billing_page=true",subdomain="selfhosting",)self.assertEqual(response.status_code, 302)- self.assertTrue(response["Location"].startswith("https://billing.stripe.com"))+ self.assertTrue(response["Location"].startswith("https://billing.stripe.com/"))@responses.activate@mock_stripe()@@ -9690,14 +9690,14 @@ class TestRemoteServerBillingFlow(StripeTestCase, RemoteServerTestCase):f"{self.billing_session.billing_base_url}/invoices/", subdomain="selfhosting")self.assertEqual(response.status_code, 302)- self.assertTrue(response["Location"].startswith("https://billing.stripe.com"))+ self.assertTrue(response["Location"].startswith("https://billing.stripe.com/"))response = self.client_get(f"{self.billing_session.billing_base_url}/customer_portal/?return_to_billing_page=true",subdomain="selfhosting",)self.assertEqual(response.status_code, 302)- self.assertTrue(response["Location"].startswith("https://billing.stripe.com"))+ self.assertTrue(response["Location"].startswith("https://billing.stripe.com/"))@responses.activate@mock_stripe()