zulip/corporate/tests
Lauryn Menard 673a01ea0c realm-deactivation: Send email to owners as part of deactivation.
Creates a new "realm_deactivated" email that can be sent to realm
owners as part of `do_deactivate_realm`, via a boolean flag,
`email_owners`.

This flag is set to `False` when `do_deactivate_realm` is used for
realm exports or changing a realm's subdomain, so that the active
organization owners are not emailed in those cases.

This flag is optional for the `deactivate_realm` management command,
but as there is no active user passed in that case, then the email
is sent without referencing who deactivated the realm.

It is passed as `True` for the support analytics view, but the email
that is generated does not include information about the support
admin user who completed the request for organization deactivation.

When an active organization owner deactivates the organization, then
the flag is `True` and an email is sent to them as well as any other
active organization owners, with a slight variation in the email text
for those two cases.

Adds specific tests for when `email_owners` is passed as `True`. All
existing tests for other functionality of `do_deactivate_user` pass
the flag as `False`.

Adds `localize` from django.util.formats as a jinja env filter so
that the dates in these emails are internationlized for the owner's
default language setting in the "realm_deactivated" email templates.

Fixes #24685.
2024-06-26 16:48:18 -07:00
..
stripe_fixtures stripe: Change pricing for plus plan. 2024-04-19 09:57:43 -07:00
__init__.py
test_activity_views.py support: Show annual revenue for active fixed price plans. 2024-05-22 15:57:59 -07:00
test_remote_billing.py remote_billing: Move stripe_customer_id from server to realm if needed. 2024-03-29 16:27:03 -07:00
test_remote_counts.py python: Consistently use from…import for datetime. 2023-12-05 12:01:18 -08:00
test_stripe.py realm-deactivation: Send email to owners as part of deactivation. 2024-06-26 16:48:18 -07:00
test_support_views.py realm-deactivation: Send email to owners as part of deactivation. 2024-06-26 16:48:18 -07:00