zulip/zerver/tests
Steve Howell 81e3f489f2 Use sender realm in user_profiles_from_unvalidated_emails.
This change is mostly based on a similar commit from hackerkid
in a feature branch.  It borrows both code and ideas.  Some of
it's my own stuff, as I was working on a newer branch.

We now call get_user_including_cross_realm_email() inside of
user_profiles_from_unvalidated_emails(), instead of using
get_user_profile_by_email.

This requires a few of our callers to pass down sender into us.

One consequence of this change is that we change the symptoms
for trying to send to emails outside of your realm.  In some
cases, we simply raise an error that an email is invalid to us
instead of getting into the deeper validate_recipient_user_profiles
check.
2017-08-22 10:42:15 -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 test_alert_words: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -07:00
test_attachments.py tests: Remove unused ujson imports. 2017-08-17 09:05:52 -07:00
test_audit_log.py actions: Start logging subscription activities in RealmAuditLog. 2017-07-17 17:23:41 -07:00
test_auth_backends.py result.json: Upgrade test_auth_backends. 2017-08-17 09:03:35 -07:00
test_bots.py result.json: Upgrade test_bots. 2017-08-17 09:03:35 -07:00
test_bugdown.py test_bugdown: Fix duplicated test name. 2017-08-16 11:29:12 -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 api: Fix caps in JSON validation error message. 2017-06-27 08:33:56 -04:00
test_decorators.py api: Allow incoming webhook bots to use the send_message API. 2017-08-22 10:06:34 -07:00
test_docs.py Add /config-error/smtp endpoint for SMTP errors. 2017-08-21 15:39:26 -07:00
test_email_change.py Fix changing email addresses back after email change. 2017-08-05 10:49:44 -07:00
test_email_mirror.py emails: Change send_future_email to accept a to_user_id. 2017-07-16 16:56:39 -07:00
test_events.py result.json: Upgrade test_events. 2017-08-17 09:03:35 -07:00
test_export.py tests: Replaced @zulip.com references with self.example_ functions. 2017-05-23 20:59:50 -07:00
test_external.py tests: Remove unused ujson imports. 2017-08-17 09:05:52 -07:00
test_home.py soft_deactivation: Fix flaky tests by seeding message for users. 2017-08-18 07:02:11 -04:00
test_hotspots.py hotspots: Refactor backend for hotspots v2. 2017-07-28 16:34:13 -07:00
test_i18n.py invites: Migrate to non-legacy API format. 2017-07-31 13:08:06 -07:00
test_link_embed.py preview.py: Fix error raised on uploading file with unicode filename. 2017-06-19 14:58:44 -04:00
test_logging_handlers.py mypy: Pass empty dict to makeRecord for args, instead of None. 2017-08-09 18:04:21 -07:00
test_management_commands.py management: Fix typo in get_realm CommandError message. 2017-08-08 14:13:19 -07:00
test_messages.py Use sender realm in user_profiles_from_unvalidated_emails. 2017-08-22 10:42:15 -07:00
test_middleware.py tests: Extract zerver/tests/test_middleware.py. 2017-03-08 03:57:37 -08:00
test_muting.py tests: Remove get_user_profile_by_email from most tests. 2017-05-24 13:05:19 -07:00
test_narrow.py result.json: Upgrade test_narrow. 2017-08-17 09:03:35 -07:00
test_new_users.py Fix new-login emails for iOS not identifying OS correctly. 2017-07-07 13:34:25 -07:00
test_notifications.py tests: Remove unused ujson imports. 2017-08-17 09:05:52 -07:00
test_outgoing_webhook_interfaces.py outgoing webhooks: Remove process_failure interface method. 2017-07-24 14:10:14 -07:00
test_outgoing_webhook_system.py outgoing webhooks: Remove process_failure interface method. 2017-07-24 14:10:14 -07:00
test_presence.py tests: Remove unused ujson imports. 2017-08-17 09:05:52 -07:00
test_push_notifications.py push_notifications: Fix incorrect URL being used in bouncer test. 2017-07-31 13:08:06 -07:00
test_queue_worker.py tests: Replaced @zulip.com references with self.example_ functions. 2017-05-23 20:59:50 -07:00
test_reactions.py result.json: Upgrade test_reactions. 2017-08-17 09:03:35 -07:00
test_realm.py mypy: Amend tornado_redirected_to_list calls to use Mapping. 2017-08-05 12:08:59 -07:00
test_realm_domains.py result.json: Upgrade test_realm_domains. 2017-08-17 09:03:35 -07:00
test_realm_emoji.py tests: Remove unused ujson imports. 2017-08-17 09:05:52 -07:00
test_realm_filters.py tests: Remove unused ujson imports. 2017-08-17 09:05:52 -07:00
test_report.py tests: Replaced @zulip.com references with self.example_ functions. 2017-05-23 20:59:50 -07:00
test_retention.py messages: Add support for admins deleting messages. 2017-05-29 21:59:38 -07:00
test_service_bot_system.py bots: Add additional service bot tests. 2017-05-25 15:00:51 -07:00
test_sessions.py tests: Fix str/Text mypy issues in various tests. 2017-05-24 15:19:38 -07:00
test_settings.py result.json: Upgrade test_settings. 2017-08-17 09:03:35 -07:00
test_signup.py Replace adddressee.for_email() with for_user_profile(). 2017-08-22 10:42:15 -07:00
test_soft_deactivation.py soft_deactivation: Fix flaky tests by seeding message for users. 2017-08-18 07:02:11 -04:00
test_subs.py result.json: Upgrade test_subs. 2017-08-17 09:03:35 -07:00
test_templates.py Deduplicate header markup for portico and portico-help templates. 2017-08-15 12:15:21 -07:00
test_timestamp.py Replace timezone.utc with timezone_utc. 2017-04-16 12:28:56 -07:00
test_tornado.py Revert commits related to client_message_id. 2017-07-14 12:13:35 -07:00
test_tutorial.py api: Fix caps in JSON validation error message. 2017-06-27 08:33:56 -04:00
test_type_debug.py pep8: Add compliance with rule E261 to test_type_debug.py. 2017-05-07 23:21:50 -07:00
test_typing.py mypy: Amend tornado_redirected_to_list calls to use Mapping. 2017-08-05 12:08:59 -07:00
test_unread.py unread: Convert mark_topic_as_read to use stream IDs. 2017-08-15 10:40:02 -07:00
test_upload.py Use sender realm in user_profiles_from_unvalidated_emails. 2017-08-22 10:42:15 -07:00
test_urls.py api: Allow incoming webhook bots to use the send_message API. 2017-08-22 10:06:34 -07:00
test_users.py result.json: Upgrade test_users. 2017-08-17 09:03:35 -07:00
test_zephyr.py bots: Move zephyr-related files to api/integrations/zephyr/. 2017-05-26 15:07:02 -07:00
tests.py retention-period: Add retention period to front-end admin organization settings. 2017-03-25 17:57:18 -07:00