mirror of https://github.com/zulip/zulip.git
coverage: Enforce full test coverage for corporate/views.py.
This commit is contained in:
parent
052640dfd5
commit
0cf4a75fb5
|
@ -107,9 +107,9 @@ def billing_home(request: HttpRequest) -> HttpResponse:
|
||||||
context = {'admin_access': True}
|
context = {'admin_access': True}
|
||||||
|
|
||||||
stripe_customer = stripe_get_customer(customer.stripe_customer_id)
|
stripe_customer = stripe_get_customer(customer.stripe_customer_id)
|
||||||
if stripe_customer.account_balance > 0:
|
if stripe_customer.account_balance > 0: # nocoverage, waiting for mock_stripe to mature
|
||||||
context.update({'account_charges': '{:,.2f}'.format(stripe_customer.account_balance / 100.)})
|
context.update({'account_charges': '{:,.2f}'.format(stripe_customer.account_balance / 100.)})
|
||||||
if stripe_customer.account_balance < 0:
|
if stripe_customer.account_balance < 0: # nocoverage
|
||||||
context.update({'account_credits': '{:,.2f}'.format(-stripe_customer.account_balance / 100.)})
|
context.update({'account_credits': '{:,.2f}'.format(-stripe_customer.account_balance / 100.)})
|
||||||
|
|
||||||
subscription = extract_current_subscription(stripe_customer)
|
subscription = extract_current_subscription(stripe_customer)
|
||||||
|
|
|
@ -28,8 +28,9 @@ target_fully_covered = {path for target in [
|
||||||
# zerver/ and zerver/lib/ are important core files
|
# zerver/ and zerver/lib/ are important core files
|
||||||
'zerver/*.py',
|
'zerver/*.py',
|
||||||
'zerver/lib/*.py',
|
'zerver/lib/*.py',
|
||||||
# stripe.py handles billing
|
# Billing files require 100% test coverage
|
||||||
'corporate/lib/stripe.py',
|
'corporate/lib/stripe.py',
|
||||||
|
'corporate/views.py',
|
||||||
# Test files should have 100% coverage; test code that isn't run
|
# Test files should have 100% coverage; test code that isn't run
|
||||||
# is likely a bug in the test.
|
# is likely a bug in the test.
|
||||||
'zerver/tests/*.py',
|
'zerver/tests/*.py',
|
||||||
|
|
Loading…
Reference in New Issue