Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

test_stripe: Don't return None on mocked return of stripe functions.

Aman Agrawal104a7dd7a0a9
diff --git a/corporate/tests/test_stripe.py b/corporate/tests/test_stripe.py
index 00fc93834c4..b1337ffc09b 100644
--- a/corporate/tests/test_stripe.py
+++ b/corporate/tests/test_stripe.py
@@ -784,9 +784,9 @@ class StripeTestCase(ZulipTestCase):
def setup_mocked_stripe(self, callback: Callable[..., Any], *args: Any, **kwargs: Any) -> Mock:
with patch.multiple("stripe", Invoice=mock.DEFAULT, InvoiceItem=mock.DEFAULT) as mocked:
- mocked["Invoice"].create.return_value = None
- mocked["Invoice"].finalize_invoice.return_value = None
- mocked["InvoiceItem"].create.return_value = None
+ mocked["Invoice"].create.return_value = mock.Mock()
+ mocked["Invoice"].finalize_invoice.return_value = mock.Mock()
+ mocked["InvoiceItem"].create.return_value = mock.Mock()
callback(*args, **kwargs)
return mocked