zulip/analytics
Steve Howell 1306239c16 tests: Use email/delivery_email more explicitly.
We try to use the correct variation of `email`
or `delivery_email`, even though in some
databases they are the same.

(To find the differences, I temporarily hacked
populate_db to use different values for email
and delivery_email, and reduced email visibility
in the zulip realm to admins only.)

In places where we want the "normal" realm
behavior of showing emails (and having `email`
be the same as `delivery_email`), we use
the new `reset_emails_in_zulip_realm` helper.

A couple random things:

    - I fixed any error messages that were leaking
      the wrong email

    - a test that claimed to rely on the order
      of emails no longer does (we sort user_ids
      instead)

    - we now use user_ids in some place where we used
      to use emails

    - for IRC mirrors I just punted and used
      `reset_emails_in_zulip_realm` in most places

    - for MIT-related tests, I didn't fix email
      vs. delivery_email unless it was obvious

I also explicitly reset the realm to a "normal"
realm for a couple tests that I frankly just didn't
have the energy to debug.  (Also, we do want some
coverage on the normal case, even though it is
"easier" for tests to pass if you mix up `email`
and `delivery_email`.)

In particular, I just reset data for the analytics
and corporate tests.
2020-03-19 16:04:03 -07:00
..
lib analytics: Added comments. 2020-01-28 14:57:32 -08:00
management python: Sort migrations/management command imports with isort. 2020-01-14 13:07:47 -08:00
migrations migrations: Fix unused import error. 2020-03-06 12:17:19 -08:00
tests tests: Use email/delivery_email more explicitly. 2020-03-19 16:04:03 -07:00
__init__.py Create "analytics" app with activity reports. 2013-11-06 12:07:32 -05:00
models.py analytics: Fix missing unique constraint when subgroup is null. 2020-03-06 11:10:04 -08:00
urls.py activity: Create interface for doing support operations. 2019-03-11 12:01:11 -07:00
views.py support: Send confirmation email on realm activation. 2019-12-02 09:51:45 -08:00