zulip/zerver/tests
Steve Howell 2b4faaa847 Support non-search queries in /json/messages/matches_narrow.
For filters like has:link, where the web app doesn't necessarily
want to guess whether incoming messages meet the criteria of the
filter, the server is asked to query rows that match the query.

Usually these queries are search queries, which have fields for
content_matches and subject_matches.  Our logic was handling those
correctly.

Non-search queries were throwing an exception related to tuple
unpacking.  Now we recognize when those fields are absent and
do the proper thing.

There are probably situations where the web app should stop hitting
this endpoint and just use its own filters.  We are making the most
defensive fix first.

Fixes #6118
2017-08-23 01:07:57 -07:00
..
images Update types of images accepted as avatars. 2016-07-26 16:36:47 +05:30
__init__.py
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 Support non-search queries in /json/messages/matches_narrow. 2017-08-23 01:07:57 -07:00
test_new_users.py auth: Improve robustness of not sending duplicate login emails. 2017-08-22 16:26:30 -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_notification: Retry event in case of error. 2017-08-22 11:16:48 -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 realm: Add clear error message for too-long realm name. 2017-08-22 22:04:52 -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