zulip/zerver
Steve Howell a8f5836ee6 tests: Make soft-reactivation tests readable.
The `expected` flag was incredibly confusing, as you
couldn't tell from the calling code what you were
actually expecting to happen.

I avoid the context manager idiom in order to force
the callers to create simple helper functions, and
I de-duplicate some code in some places.

I also force the caller to explicitly soft-deactivate
the user with one simple line of code, so that the
person reading the test doesn't have to research
the side effects of the helper. (And I make it
very easy for new authors to follow the practice
going forward.)

This is also somewhat of a prep commit to avoid
the obfuscated use of refresh_from_db.
2023-09-18 16:55:06 -07:00
..
actions emails: Update subject for confirm_new_email to have realm host. 2023-09-17 15:12:21 -07:00
data_import python: Elide unnecessary list wrappers. 2023-09-13 12:41:23 -07:00
integration_fixtures/nagios
lib tests: Make soft-reactivation tests readable. 2023-09-18 16:55:06 -07:00
management python: Elide unnecessary list wrappers. 2023-09-13 12:41:23 -07:00
migrations user_settings: Add new `web_stream_unreads_count_display_policy` field. 2023-09-13 18:45:45 -07:00
openapi response: Remove "result: partially_completed" for success responses. 2023-09-18 13:18:24 -07:00
tests tests: Make soft-reactivation tests readable. 2023-09-18 16:55:06 -07:00
tornado python: Delete superfluous parens. 2023-09-13 13:40:19 -07:00
transaction_tests docs: Fix typos caught by ‘typos’. 2023-09-06 18:59:05 -07:00
views response: Remove "result: partially_completed" for success responses. 2023-09-18 13:18:24 -07:00
webhooks python: Delete superfluous parens. 2023-09-13 13:40:19 -07:00
worker python: Replace functools.partial with type-safe returns.curry.partial. 2023-09-11 18:03:45 -07:00
__init__.py
apps.py requirements: Upgrade Python requirements. 2023-04-03 22:39:21 -07:00
context_processors.py emails: Add corporate_enabled to context for emails. 2023-05-01 10:32:43 -07:00
decorator.py logging_util: Remove dependence on get_current_request. 2023-07-11 22:23:47 -07:00
filters.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
forms.py python: Convert translated positional {} fields to {named} fields. 2023-07-18 15:19:07 -07:00
logging_handlers.py error_notify: Remove custom email error reporting handler. 2023-07-20 11:00:09 -07:00
middleware.py nginx: Suppress proxy warnings when the proxy itself sent the request. 2023-09-12 10:10:58 -07:00
models.py user_settings: Add new `web_stream_unreads_count_display_policy` field. 2023-09-13 18:45:45 -07:00
signals.py demo-orgs: Create dev environment demo organization without email. 2023-08-31 15:02:16 -07:00