zulip/zerver/tests
Steve Howell 635675fe48 Reduce queries needed for sending messages.
In do_send_messages, we only produce one dictionary for
the event queues, instead of different flavors for text
vs. html.  This prevents two unnecessary queries to the
database.

It also means we only put one dictionary on the "message"
event queue instead of two, albeit a wider one that has
some values that won't be sent to the actual clients.

This wider dictionary from MessageDict.wide_dict is also
used for the `feedback_messages` queue and service bot
queues.  Since the extra fields are possibly useful down
the road, and they'll just be ignored for now, we don't
bother to remove them.  Also, those queue processors won't
have access to `content_type`, which they shouldn't need.

Fixes #6947
2017-10-26 16:35:28 -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 zerver/tests: Remove print_function. 2017-09-27 18:05:45 -07:00
test_attachments.py lint: Replace `pk` with `id` where they are equivalent. 2017-10-06 12:52:12 -07:00
test_audit_log.py Use stream ids in various tests. 2017-10-08 20:18:34 -07:00
test_auth_backends.py subdomains: Clean up a use of various falsy values for the root domain. 2017-10-26 10:29:17 -07:00
test_bots.py Embedded bots: Add support for creating embedded bots via the API. 2017-10-25 16:13:29 -07:00
test_bugdown.py Make sure mentions refer only to active users. 2017-10-12 17:11:36 -07:00
test_compatibility.py zerver/tests: Remove print_function. 2017-09-27 18:05:45 -07:00
test_custom_profile_data.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_decorators.py test_decorators: Replace the json/tutorial_status endpoint in tests. 2017-10-09 15:13:33 -07:00
test_docs.py backends: Move EmailLogBackEnd to email_backends. 2017-10-25 14:35:12 -07:00
test_email_change.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_email_mirror.py tests: Enable call_consume_in_tests for email mirror queue. 2017-10-26 14:53:27 -07:00
test_embedded_bot_system.py embedded bots: Add message flow tests. 2017-10-25 16:13:37 -07:00
test_event_queue.py Excluded topic-muted users from stream push notifications. 2017-10-23 17:26:15 -07:00
test_events.py Reduce queries needed for sending messages. 2017-10-26 16:35:28 -07:00
test_export.py refactor: Replace mkdir_p functions with Python 3 builtin. 2017-10-25 11:06:11 -07:00
test_external.py py3: Remove "from six.moves import range". 2017-10-17 23:28:14 -07:00
test_home.py Fix bug in flush_user_profile(). 2017-10-25 11:30:56 -07:00
test_hotspots.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_i18n.py Revert "locale: Fix incorrect locale name for zh-Hans." 2017-10-06 10:09:08 -07:00
test_link_embed.py zerver/tests: Remove print_function. 2017-09-27 18:05:45 -07:00
test_logging_handlers.py logging: Clear out the Django default config on logger `django`. 2017-10-12 22:45:14 -07:00
test_management_commands.py test_management_commands: Add check for expected system exit. 2017-10-20 09:16:38 -07:00
test_message_edit_notifications.py notifications: Simplify how triggers are passed around. 2017-10-18 21:42:05 -07:00
test_messages.py Reduce queries needed for sending messages. 2017-10-26 16:35:28 -07:00
test_middleware.py urls: Move the report endpoints to be API-style routes. 2017-10-17 22:05:56 -07:00
test_muting.py Add StreamTopicTarget.user_ids_muting_topic(). 2017-10-23 17:26:15 -07:00
test_narrow.py Reduce queries needed for sending messages. 2017-10-26 16:35:28 -07:00
test_new_users.py Use stream ids in various tests. 2017-10-08 20:18:34 -07:00
test_notifications.py py3: Remove "from six.moves import range". 2017-10-17 23:28:14 -07:00
test_outgoing_webhook_interfaces.py zerver/tests: Remove print_function. 2017-09-27 18:05:45 -07:00
test_outgoing_webhook_system.py settings: Remove remaining references to REALMS_HAVE_SUBDOMAINS. 2017-10-02 16:43:54 -07:00
test_presence.py tests: Don't use caching session engine in tests. 2017-10-06 12:22:20 -07:00
test_push_notifications.py test_push_notifications: Fix tests failing due to rebase. 2017-10-19 18:34:28 -07:00
test_queue_worker.py queue: Add test for signups retry logic. 2017-10-05 23:14:19 -07:00
test_reactions.py reactions.py: Don't check for valid emoji name while removing reaction. 2017-10-09 17:54:37 +00:00
test_realm.py Use stream ids in various tests. 2017-10-08 20:18:34 -07:00
test_realm_domains.py subdomains: Hardcode REALMS_HAVE_SUBDOMAINS=True. 2017-10-02 16:42:43 -07:00
test_realm_emoji.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_realm_filters.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_report.py urls: Move the report endpoints to be API-style routes. 2017-10-17 22:05:56 -07:00
test_retention.py py3: Remove "from six.moves import range". 2017-10-17 23:28:14 -07:00
test_service_bot_system.py embedded bots: Add StateHandler remove() function. 2017-10-26 14:49:50 -07:00
test_sessions.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_settings.py zerver/tests: Remove print_function. 2017-09-27 18:05:45 -07:00
test_signup.py Reduce queries needed for sending messages. 2017-10-26 16:35:28 -07:00
test_soft_deactivation.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_subs.py Reduce queries needed for sending messages. 2017-10-26 16:35:28 -07:00
test_templates.py tests: Add @slow decorator to various methods needing it. 2017-10-06 15:45:04 -07:00
test_timestamp.py analytics: Enforce various datetime arguments are in UTC. 2017-10-05 11:22:06 -07:00
test_tornado.py zerver/tests: Remove print_function. 2017-09-27 18:05:45 -07:00
test_tutorial.py onboarding: Add welcome-bot response to initial user message. 2017-10-11 20:45:42 -07:00
test_type_debug.py zerver/tests: Remove print_function. 2017-09-27 18:05:45 -07:00
test_typing.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_unread.py zerver/tests: Remove absolute_import. 2017-09-27 10:00:39 -07:00
test_upload.py Add get_avatar_field() function. 2017-10-12 14:00:41 -07:00
test_urls.py errors: Force a super-simpler handler for 400 errors. 2017-10-11 20:43:36 -07:00
test_users.py Fix bug in flush_user_profile(). 2017-10-25 11:30:56 -07:00
test_zephyr.py zephyr: Update path to process_cache for repository split. 2017-10-05 12:35:20 -07:00
tests.py retention-period: Add retention period to front-end admin organization settings. 2017-03-25 17:57:18 -07:00