zulip/zerver/tests
Steve Howell 47bcedbc1b Fix server searches for is:mentioned and is:alerted.
Before this change, server searches for both
`is:mentioned` and `is:alerted` would return all messages
where the user is specifically mentioned (but not
at-all mentions).

Now we follow the JS semantics:

    is:mentioned -- all mentions, including wildcards
    is:alerted  -- has an alert word

Here is one relevant JS snippet:

        } else if (operand === 'mentioned') {
            return message.mentioned;
        } else if (operand === 'alerted') {
            return message.alerted;

And here you see that `mentioned` is OR'ed over both mention flags:

    message.mentioned = convert_flag('mentioned') || convert_flag('wildcard_mentioned');

The `alerted` flag on the JS side is a simple mapping:

    message.alerted = convert_flag('has_alert_word');

Fixes #5020
2017-08-16 11:29:12 -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 test_attachments: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -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 register: Don't display field to enter password unless needed. 2017-08-09 13:44:57 -07:00
test_bots.py test_bots: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -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 decorator: Extract validate_account_and_subdomain and deduplicate. 2017-08-15 10:54:23 -07:00
test_docs.py auth.py: Add config_error page for misconfigured github/google auth. 2017-08-16 10:05:19 -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 Extract do_mark_stream_messages_as_read. 2017-08-15 10:09:10 -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 rate_limiter: Upgrade clear_user_history to generic API. 2017-08-02 18:01:39 -07:00
test_home.py events: Fill in missing messages for a returing soft_deactivated user. 2017-08-15 08:33:16 -07: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 test_messages: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -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 Fix server searches for is:mentioned and is:alerted. 2017-08-16 11:29:12 -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 test_notifications: Fix reply-to email for test suite. 2017-08-15 18:33:15 -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 test_presence: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -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 test_reactions: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -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 Replace iago@zulip.com with example_email('iago'). 2017-05-24 19:37:36 -07:00
test_realm_emoji.py test_realm_emoji: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -07:00
test_realm_filters.py test_realm_filters: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -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 settings: Migrate main settings-change code to API. 2017-07-31 13:08:06 -07:00
test_signup.py test_signup: Clean up re-fetching of user objects. 2017-08-15 12:52:23 -07:00
test_soft_deactivation.py soft_deactivation: Add helper functions. 2017-08-15 08:33:16 -07:00
test_subs.py test_subs: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -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 test_uploads: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -07:00
test_urls.py test_urls: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -07:00
test_users.py test_users: Upgrade to HttpResponse.json(). 2017-08-16 07:06:58 -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