zulip/zerver
m-e-l-u-h-a-n cbfd6464a5 logging: replace mock.patch() for logging with assertLogs()
This commit removes mock.patch with assertLogs().

* Adds return value to do_rest_call() in outgoing_webhook.py, to
  support asserting log output in test_outgoing_webhook_system.py.

* Logs are not asserted in test_realm.py because it would require to users
  to be queried using users=User.objects.filter(realm=realm) and the order
  of resulting queryset varies for each run.

* In test_decorators.py, replacement of mock.patch is not done because
  I'm not sure if it's worth the effort to replace it as it's a return
  value of a function.

Tweaked by tabbott to set proper mypy types.
2020-10-29 15:37:45 -07:00
..
data_import python: Pass query parameters as a dict when making GET requests. 2020-10-27 13:47:02 -07:00
lib logging: replace mock.patch() for logging with assertLogs() 2020-10-29 15:37:45 -07:00
management export: Only include real, active humans in the displayed count. 2020-10-28 18:31:06 -07:00
migrations uploads: Support non-AWS S3-compatible server. 2020-10-28 21:59:07 -07:00
openapi openapi: Fix the "the the" instances. 2020-10-26 12:50:01 -07:00
templatetags python: Replace list literal concatenation with * unpacking. 2020-09-02 11:15:41 -07:00
tests logging: replace mock.patch() for logging with assertLogs() 2020-10-29 15:37:45 -07:00
tornado tornado: Never use proxies when talking from Django to Tornado. 2020-10-28 12:13:04 -07:00
views drafts: Make the ID of the draft a part of the draft dict. 2020-10-29 11:06:04 -07:00
webhooks docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
worker logging: Add logging in deferred_work queue processor. 2020-10-29 10:34:53 -07:00
__init__.py
apps.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
context_processors.py i18n: Don't include email tags in translation strings. 2020-09-25 15:53:26 -07:00
decorator.py decorator: Unfork redirect_to_login. 2020-10-25 14:58:53 -07:00
filters.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
forms.py forms: Convert percent formatting to "".format. 2020-10-19 11:54:14 -07:00
logging_handlers.py docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
middleware.py docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
models.py drafts: Make the ID of the draft a part of the draft dict. 2020-10-29 11:06:04 -07:00
signals.py timezone: Remove get_timezone wrapper. 2020-10-27 13:42:54 -07:00