zulip/zerver/tests
Steve Howell c235333041 test performance: Pass in users to api_* helpers.
This reduces query counts in some cases, since
we no longer need to look up the user again. In
particular, it reduces some noise when we
count queries for O(N)-related tests.

The query count is usually reduced by 2 per
API call.  We no longer need to look up Realm
and UserProfile.  In most cases we are saving
these lookups for the whole tests, since we
usually already have the `user` objects for
other reasons.  In a few places we are simply
moving where that query happens within the
test.

In some places I shorten names like `test_user`
or `user_profile` to just be `user`.
2020-03-11 14:18:29 -07:00
..
fixtures bugdown: Avoid hanging list paragraphs being processed as codeblocks. 2020-03-03 12:08:19 -08:00
images emoji: Only resize custom emoji that need it. 2019-01-29 10:33:50 -08:00
__init__.py
test_alert_words.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_archive.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_attachments.py tests: setUp overrides should call super().setUp(). 2019-10-19 17:27:01 -07:00
test_audit_log.py billing: Sync realm activation events for on-prem billing. 2019-10-08 17:18:30 -07:00
test_auth_backends.py tests: Use users for common_subscribe_to_streams. 2020-03-11 14:18:29 -07:00
test_bots.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_bugdown.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_cache.py test_cache: Test caching of None values is handled correctly. 2020-02-21 09:05:46 -08:00
test_camo.py camo: Add endpoint to handle camo requests. 2019-01-04 10:27:04 -08:00
test_compatibility.py home: Don't assume user agent header is set for insecure_desktop_app. 2020-02-28 16:51:23 -08:00
test_create_video_call.py tests: Set class name of video call test to TestVideoCall. 2020-01-25 22:54:59 -08:00
test_custom_profile_data.py tests: Count queries for /json/users. 2020-02-09 22:04:02 -08:00
test_decorators.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_digest.py tests: Use users for common_subscribe_to_streams. 2020-03-11 14:18:29 -07:00
test_docs.py decorators: Restructure get_client_name interface. 2020-03-08 14:19:50 -07:00
test_email_change.py urls: Tighten many unintentionally broad URL patterns. 2019-08-26 20:51:49 -07:00
test_email_log.py emails: Don't log emails while running test suite. 2018-10-11 15:12:08 -07:00
test_email_mirror.py email_mirror: Handle encoded attachment filenames. 2020-01-30 13:03:47 -08:00
test_email_notifications.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_embedded_bot_system.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_event_queue.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_events.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_external.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_gitter_importer.py tests: Move get_set to ZulipTestCase. 2019-05-21 14:10:29 -07:00
test_hipchat_importer.py hipchat: Limit messages in slim mode. 2018-11-26 16:37:30 -08:00
test_home.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_hotspots.py tests: setUp overrides should call super().setUp(). 2019-10-19 17:27:01 -07:00
test_i18n.py tests: tearDown overrides should call super().tearDown(). 2019-10-18 13:36:59 -07:00
test_import_export.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_integrations_dev_panel.py request: Tighten type checking on REQ. 2019-11-13 12:35:55 -08:00
test_internet.py tests: Replace httpretty with responses. 2020-01-22 11:56:15 -08:00
test_legacy_subject.py Add alias support to REQ helpers for subject/topic. 2018-11-12 15:47:11 -08:00
test_link_embed.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_logging_handlers.py tests: setUp overrides should call super().setUp(). 2019-10-19 17:27:01 -07:00
test_management_commands.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_mattermost_importer.py emoji_codes: Replace JS module with JSON module. 2020-02-12 10:09:12 -08:00
test_message_edit_notifications.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_messages.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_middleware.py middleware: Log user.id/realm.string_id instead of _email. 2020-03-09 13:54:58 -07:00
test_migrations.py test_migrations: Disable migrations test. 2019-05-12 22:06:17 -07:00
test_muting.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_narrow.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_new_users.py cross realm bots: Simplify notify_new_user. 2020-02-10 15:45:13 -08:00
test_onboarding.py
test_openapi.py typing: Deprecate emails in typing endpoint. 2020-02-28 12:39:36 -08:00
test_outgoing_webhook_interfaces.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_outgoing_webhook_system.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_populate_db.py models: Migration of Message.pub_date to date_sent, part 2. 2019-10-05 19:01:34 -07:00
test_presence.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_push_notifications.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_queue.py Upgrade pika to 1.1.*. 2019-10-29 17:01:12 -07:00
test_queue_worker.py middleware: Log user.id/realm.string_id instead of _email. 2020-03-09 13:54:58 -07:00
test_reactions.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_realm.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_realm_domains.py populate_db: Don't restrict email domains by default in tests and dev. 2020-03-07 18:38:59 -08:00
test_realm_emoji.py get_realm: raise DoesNotExist instead of returning None. 2019-05-06 21:58:16 -07:00
test_realm_export.py billing: Change RealmAuditLog.event_type from str to int. 2019-10-06 15:55:56 -07:00
test_realm_filters.py linkifiers: Allow semicolons in target URLs. 2019-05-14 11:17:55 -07:00
test_redis_utils.py redis_utils: Require key_format argument in get_dict_from_redis. 2020-01-26 21:40:15 -08:00
test_report.py zerver/tests: Remove unused imports. 2019-02-02 17:43:03 -08:00
test_retention.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_service_bot_system.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_sessions.py sessions: Implement the concept of expirable session variables. 2020-02-12 11:09:55 -08:00
test_settings.py tests: For ldap tests, give each ldap user a unique password. 2020-02-19 14:46:29 -08:00
test_signup.py populate_db: Don't restrict email domains by default in tests and dev. 2020-03-07 18:38:59 -08:00
test_slack_importer.py import: Support importing team icon from slack. 2020-02-03 14:09:05 -08:00
test_slack_message_conversion.py test_slack_message_conversion: Use subTest for fixtures test. 2019-09-13 11:54:14 -07:00
test_soft_deactivation.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_subdomains.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
test_submessage.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_subs.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_templates.py test_templates: Remove shallow template rendering code. 2020-02-11 18:00:15 -08:00
test_thumbnail.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_timestamp.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
test_tornado.py test_classes: Use realistic web and mobile User-Agent strings. 2020-02-24 23:19:43 -08:00
test_transfer.py management: Add tooling for transfering local uploads to s3. 2019-02-14 14:31:46 -08:00
test_tutorial.py tests: Use users in send_*_message. 2020-03-07 18:30:13 -08:00
test_type_debug.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00
test_typing.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_unread.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_upload.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_urls.py dependencies: Upgrade to Django 2.2.10. 2020-02-13 16:27:26 -08:00
test_user_groups.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_user_status.py user status: Add "status_text" support in the backend. 2019-01-24 09:46:35 -08:00
test_users.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_webhooks_common.py webhooks: Eliminate the usage of a headers.py file. 2019-06-26 10:35:14 -07:00
test_widgets.py test performance: Pass in users to api_* helpers. 2020-03-11 14:18:29 -07:00
test_zcommand.py
test_zephyr.py cleanup: Delete leading newlines. 2019-08-06 23:29:11 -07:00