zulip/zerver/tests
Rishi Gupta 326f9a8506 email: Fix zephyr mirror registration email not working with subdomains.
If a user is trying to register for a mit zephyr mirroring realm, we send
them a specific registration email with a link to a few more instructions.

There is only one server that we know about that has such a realm, and that
server uses subdomains. This commit changes the logic to work in the
subdomains case, rather than in the non-subdomains case (though see next
para).

Note that the current check is deceptive, and is not actually correct in the
non-subdomains case. The prereg user has a realm only in the atypical case
of someone registering via the special URL for completely-open realms.

To do this correctly in the non-subdomains case, we would need to copy a
bunch of the logic from the beginning of accounts_register to figure out
which realm the user is signing up for, so that we can check if that realm
is a zephyr mirroring realm. Given how complicated the registration code is
already, I think it is probably not worth it at the moment. This commit also
removes the partial (deceptive) check, since I think it does more harm than
good.
2017-05-03 20:52:24 -07:00
..
images Update types of images accepted as avatars. 2016-07-26 16:36:47 +05:30
__init__.py Fix missing zerver/tests/__init__.py. 2016-04-11 22:34:22 -07:00
test_alert_words.py alert_words: Consistently clean whitespace for alert words. 2017-02-16 21:06:18 -08:00
test_attachments.py Add support for managing and deleting attachments. 2017-02-16 23:44:44 -08:00
test_audit_log.py Switch regenerate_api_key to use RealmAuditLog. 2017-04-25 10:23:33 -07:00
test_auth_backends.py auth: Add new route to get server settings. 2017-05-03 16:40:14 -07:00
test_bots.py actions.py: Only admins and bot's owner should recieve bot related events. 2017-03-25 18:22:15 -07:00
test_bugdown.py realm-emoji: Add realm emoji uploading instead url providing. 2017-05-01 14:50:20 -07:00
test_compatibility.py mobile: Add an endpoint for checking compatibility. 2017-02-03 09:55:34 -08:00
test_custom_profile_data.py testing: Fix test_update_invalid_value. 2017-04-18 21:46:14 -07:00
test_decorators.py zerver/decorator: Set request.client in api_key_only_webhook_view. 2017-05-01 23:44:07 -07:00
test_docs.py Redesign login and registration pages. 2017-04-26 18:04:05 -07:00
test_email_change.py user_settings: Update change-email confirmation message. 2017-05-03 19:34:58 -07:00
test_email_mirror.py email-mirror: Move postfix email mirror integration to separate script. 2017-04-24 21:24:23 -07:00
test_events.py home: Get pm_content_in_desktop_notifications from register_ret. 2017-04-28 22:06:32 -07:00
test_export.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
test_external.py tests: s/assertEquals/assertEqual/ due to deprecation. 2016-12-15 17:02:03 -08:00
test_home.py home.py: move initial_pointer as pointer to register_ret. 2017-04-28 23:39:14 -07:00
test_hotspots.py tests: Get hotspots to 100% test coverage. 2017-03-29 14:04:33 -07:00
test_i18n.py Remove zh_CN old Django name for Chinese. 2017-02-03 14:29:03 -08:00
test_link_embed.py Add realm-level settings to control inline image and url preview. 2017-03-21 15:46:17 -07:00
test_logging_handlers.py mypy: Move `type: ignore` check to the line with the error. 2017-04-25 23:44:41 -07:00
test_management_commands.py create_realm: Fix heading for creating an organization. 2017-04-27 11:12:09 -07:00
test_messages.py Replace timezone.now with timezone_now. 2017-04-16 12:28:56 -07:00
test_middleware.py tests: Extract zerver/tests/test_middleware.py. 2017-03-08 03:57:37 -08:00
test_muting.py Implemented test's for muting/unmuting a topic 2017-03-15 16:19:00 -07:00
test_narrow.py streams: Ban null character from stream name. 2017-05-01 23:43:01 -07:00
test_notifications.py test_notifications: Don't pass a user_profile to client_patch. 2017-03-23 13:08:49 -07:00
test_presence.py tests: Add wrapper for client.logout in ZulipTestCase. 2017-04-21 21:45:55 -07:00
test_push_notifications.py logging: Change missing push notification keys from error to warning. 2017-04-25 13:52:36 -07:00
test_queue_worker.py Handle unicode characters in email mirror. 2017-04-05 12:18:41 -07:00
test_reactions.py realm-emoji: Add realm emoji uploading instead url providing. 2017-05-01 14:50:20 -07:00
test_realm.py tests: Refactor test_realm to fix code duplication. 2017-04-12 13:26:53 -07:00
test_realm_domains.py test_realm_aliases.py: `realm_alias` to `realm_domain` migration. 2017-04-04 15:48:03 -07:00
test_realm_emoji.py realm-emoji: Add realm emoji uploading instead url providing. 2017-05-01 14:50:20 -07:00
test_realm_filters.py realm_filters: Support ? in URL format strings. 2017-03-25 17:13:34 -07:00
test_report.py statsd: Change keys to use Realm.string_id instead of domain. 2017-03-13 09:51:02 -07:00
test_retention.py Replace timezone.now with timezone_now. 2017-04-16 12:28:56 -07:00
test_send_login_emails.py Add notifications on new logins to Zulip. 2017-03-25 16:50:52 -07:00
test_settings.py backend: Allow to change UserProfile's `emojiset` field via api. 2017-04-24 22:30:07 -07:00
test_signup.py email: Fix zephyr mirror registration email not working with subdomains. 2017-05-03 20:52:24 -07:00
test_subs.py streams: Ban null character from stream name. 2017-05-01 23:43:01 -07:00
test_templates.py email: Fix naming of mituser_invite_email files. 2017-05-03 19:34:58 -07:00
test_timestamp.py Replace timezone.utc with timezone_utc. 2017-04-16 12:28:56 -07:00
test_tornado.py test_tornado.py: Add websocket closing to tornado tests. 2017-04-27 12:05:56 -07:00
test_tutorial.py tests: Split out ZulipTestCase and WebhookTestCase to a separate file. 2016-11-10 19:29:43 -08:00
test_type_debug.py lint: Clean up E741 PEP-8 rule. 2017-01-23 21:07:04 -08:00
test_typing.py pep8: Fix E303 violations. 2016-12-02 15:34:11 -08:00
test_unread.py Fix mobile home view returning messages older than the pointer. 2017-04-18 21:39:24 -07:00
test_upload.py tests: Add wrapper for client.logout in ZulipTestCase. 2017-04-21 21:45:55 -07:00
test_urls.py Django 1.10: Url pattern doesn't use _callback_str. 2017-03-09 00:50:12 -08:00
test_users.py test_users: Change assert_max_length to assert_length. 2017-04-04 17:07:34 -07:00
test_zephyr.py tests: Extract zerver/tests/test_zephyr.py. 2017-03-08 03:08:30 -08:00
tests.py retention-period: Add retention period to front-end admin organization settings. 2017-03-25 17:57:18 -07:00