billing: Enforce full coverage in zilencer/tests.

This commit is contained in:
Vishnu Ks 2018-08-09 19:42:49 +05:30 committed by Rishi Gupta
parent 4895637a5a
commit 0c84260faa
2 changed files with 2 additions and 1 deletions

View File

@ -33,6 +33,7 @@ target_fully_covered = {path for target in [
# 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',
'zilencer/tests/*.py',
# As a project, we require 100% test coverage in the views files. # As a project, we require 100% test coverage in the views files.
'zerver/views/*.py', 'zerver/views/*.py',
'zproject/backends.py', 'zproject/backends.py',

View File

@ -38,7 +38,7 @@ def mock_customer_with_canceled_subscription(*args: Any, **kwargs: Any) -> strip
customer.subscriptions.data[0].canceled_at = 1532602160 customer.subscriptions.data[0].canceled_at = 1532602160
return customer return customer
def mock_customer_with_cancel_at_period_end_subscription(*args: Any, **kwargs: Any) -> stripe.Customer: def mock_customer_with_cancel_at_period_end_subscription(*args: Any, **kwargs: Any) -> stripe.Customer: # nocoverage
customer = mock_customer_with_subscription() customer = mock_customer_with_subscription()
customer.subscriptions.data[0].canceled_at = 1532602243 customer.subscriptions.data[0].canceled_at = 1532602243
customer.subscriptions.data[0].cancel_at_period_end = True customer.subscriptions.data[0].cancel_at_period_end = True