billing: Don't check for stripe config while running tests.

This commit is contained in:
Vishnu Ks
2018-07-25 21:00:49 +05:30
committed by Rishi Gupta
parent 51c82b6d4f
commit ba7db968d8
2 changed files with 5 additions and 16 deletions

View File

@@ -69,7 +69,7 @@ class StripeError(JsonableError):
def catch_stripe_errors(func: CallableT) -> CallableT:
@wraps(func)
def wrapped(*args: Any, **kwargs: Any) -> Any:
if STRIPE_PUBLISHABLE_KEY is None:
if not settings.TEST_SUITE and STRIPE_PUBLISHABLE_KEY is None:
# Dev-only message; no translation needed.
raise StripeError(
"Missing Stripe config. See https://zulip.readthedocs.io/en/latest/subsystems/billing.html.")