zulip/analytics
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
..
lib docs: Fix more capitalization issues. 2020-10-23 11:46:55 -07:00
management python: Elide type=str from argparse arguments. 2020-09-03 16:17:14 -07:00
migrations migrations: Upgrade migrations to remove duplicates in all Count tables. 2020-07-30 15:18:00 -07:00
tests logging: replace mock.patch() for logging with assertLogs() 2020-10-29 15:37:45 -07:00
__init__.py Create "analytics" app with activity reports. 2013-11-06 12:07:32 -05:00
models.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
urls.py rest: Add rest_path shortcut for path with rest_dispatch. 2020-09-22 10:51:00 -07:00
views.py activity: Speed up the main query in /activity. 2020-10-23 12:45:20 -07:00