mirror of https://github.com/zulip/zulip.git
21be0ef445
Fixes #17795 In PR #17014, we added support for deactivate-own-user. And while doing so, we first deactivated the client and then reactivated it. But this implementation is a bit hacky. So, to fix this, we're now deactivating a test_user so that we don't have to reactivate it. We did so by changing the value of authentication_line. As we want to keep endpoint code out of the “test_curl_examples”, we changed the value of authentication_line in `curl_param_value_generators.py`. To work this out, we create a new global variable named AUTHENTICATION_LINE in “curl_param_value_generators.py” and change its value in function “deactivate_own_user” and to use this change in “test_curl_examples,” we import AUTHENTICATION_LINE. AUTHENTICATION_LINE is of list data type because we want a pointer to original mutable object so that changes made during run time show across the module. Another way to do this is to change the way we import variable, but that will be inconsistent to the way we had in all other files. To remove confusion between AUTHENTICATION_LINE and authentication_line we renamed authentication_line to default_authentication_line. |
||
---|---|---|
.. | ||
data_import | ||
integration_fixtures/nagios | ||
lib | ||
management | ||
migrations | ||
openapi | ||
templatetags | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |