zulip/analytics/tests
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
..
__init__.py Add a new statistics/analytics framework. 2016-10-04 17:18:54 -07:00
test_counts.py performance: Fix do_mark_stream_messages_as_read. 2020-10-16 12:58:11 -07:00
test_fixtures.py python: Sort imports with isort. 2020-06-11 16:45:32 -07:00
test_views.py logging: replace mock.patch() for logging with assertLogs() 2020-10-29 15:37:45 -07:00