mirror of https://github.com/zulip/zulip.git
billing: Fix the BillingError description check in test.
The self.assertEqual statement won't get executed because BillingError would be raised and the execution would exit with block.
This commit is contained in:
parent
d32051b106
commit
4895637a5a
|
@ -273,10 +273,9 @@ class StripeTest(ZulipTestCase):
|
|||
self.assertIsNone(extract_current_subscription(mock_customer_with_canceled_subscription()))
|
||||
|
||||
def test_subscribe_customer_to_second_plan(self) -> None:
|
||||
with self.assertRaises(BillingError) as context:
|
||||
with self.assertRaisesRegex(BillingError, 'subscribing with existing subscription'):
|
||||
do_subscribe_customer_to_plan(mock_customer_with_subscription(),
|
||||
self.stripe_plan_id, self.quantity, 0)
|
||||
self.assertEqual(context.exception.description, 'subscribing with existing subscription')
|
||||
|
||||
def test_sign_string(self) -> None:
|
||||
string = "abc"
|
||||
|
|
Loading…
Reference in New Issue