zulip/zerver/tests
Mateusz Mandera 6ab30fcced import: Set Stream.subscriber_count for imported channels.
The import code wasn't setting subscriber_count at all, resulting in a
value of 0 when dealing with imports from 3rd party apps.
We run this unconditionally, also for imports from Zulip, since this
ensures we won't inherit incorrect values, if the data we're import has
them - e.g. due to some bugs that affected the server the data came from.
2025-08-29 11:58:17 -07:00
..
fixtures markdown: Render inline audio files using the ![title](url) syntax. 2025-07-11 13:11:56 -07:00
images thumbnail: Show the first few frames of large animated images. 2025-01-15 09:56:19 -08:00
__init__.py
test_alert_words.py alert_words: Migrate alert_words to use @typed_endpoint. 2023-09-08 08:20:17 -07:00
test_attachments.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
test_audit_log.py channel_folders: Pass realm as argument to check_add_channel_folder. 2025-05-29 15:39:03 -07:00
test_auth_backends.py saml: Don't put group_memberships_sync_map in the session. 2025-07-11 10:18:58 -07:00
test_bots.py users: Fix check_valid_bot_config bug. 2025-07-11 12:34:46 -07:00
test_cache.py cache: Do not fail the request on cache-set failures. 2025-03-05 09:48:58 -08:00
test_channel_access.py tests: Move channel access tests to test_channel_access. 2025-05-28 17:02:41 -07:00
test_channel_creation.py create-channel: Add test for invalid user ID in subscribers param. 2025-08-28 10:13:02 -07:00
test_channel_fetch.py tests: Use built-in users instead of creating new users in tests. 2025-08-05 14:46:12 -07:00
test_channel_folders.py channel-folders: Send event when reordering channel folders. 2025-08-12 11:17:17 -07:00
test_channel_permissions.py settings: Add can_set_delete_message_policy_group setting. 2025-07-17 15:44:53 -07:00
test_compatibility.py python: Reformat with Ruff formatter. 2024-02-29 17:07:16 -08:00
test_create_video_call.py video-calls: Add Zoom Serverto Server OAuth integration. 2025-02-13 16:35:43 -08:00
test_custom_profile_data.py user: Remove is_billing_admin user property. 2025-03-10 09:36:30 -07:00
test_decorators.py users: Allow spectators to access /users API endpoint. 2025-05-15 12:37:29 -07:00
test_default_channels.py tests: Move test for updating default stream to test_default_channels. 2025-06-11 15:41:50 -07:00
test_delete_unclaimed_attachments.py do_delete_old_unclaimed_attachments: Cap deletions at batch size. 2024-08-28 13:57:57 -07:00
test_digest.py email: Apply message content visibility settings to digest too. 2025-04-15 16:24:59 -07:00
test_docs.py test_docs: Remove help specific tests and port rest over to /api. 2025-08-08 11:59:29 -07:00
test_drafts.py ruff: Fix UP007 Use X | Y for type annotations. 2024-07-13 22:28:22 -07:00
test_e2ee_push_notifications.py push_notifications: Log roundtrip time since worker decided to send. 2025-08-28 11:08:02 -07:00
test_email_change.py validate_email_not_already_in_realm: Add kwarg for mirror dummies. 2025-07-07 17:15:08 -07:00
test_email_log.py send_email: Skip the ScheduledEmail table for 0-delay emails. 2025-03-04 16:09:25 -08:00
test_email_mirror.py email_mirror: Fail more gracefully on empty EMAIL_GATEWAY_PATTERN. 2025-07-02 10:21:08 -07:00
test_email_notifications.py send_email: Skip the ScheduledEmail table for 0-delay emails. 2025-03-04 16:09:25 -08:00
test_embedded_bot_system.py ruff: Fix SIM117 Use a single with statement with multiple contexts. 2024-07-14 13:48:32 -07:00
test_event_queue.py event_queue: Remove pre-5.0 compatibility code. 2025-03-26 10:54:38 -07:00
test_event_system.py register-queue: Add push_devices in response. 2025-07-14 14:52:38 -07:00
test_events.py embeds: Propagate group membership before updating UserMessage flags. 2025-08-13 10:38:40 -07:00
test_example.py direct_messages: Use DM groups for 1:1 or self DMs if present. 2025-05-18 23:58:59 -07:00
test_external.py zephyr: Switch from py3dns to dnspython. 2025-02-25 11:53:08 -08:00
test_github.py apps: Provide arm64 app build by default for macOS. 2025-03-28 16:45:07 -07:00
test_handle_push_notification.py push_notification: Remove 'zulip_message_id' from FCM payload. 2025-08-05 16:54:22 -07:00
test_health.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_home.py bots: Add a setting to customize the Welcome Bot message. 2025-08-08 18:59:37 -07:00
test_i18n.py i18n: Update translation data from Transifex. 2024-11-18 16:12:31 -08:00
test_import_export.py import: Set Stream.subscriber_count for imported channels. 2025-08-29 11:58:17 -07:00
test_integrations_dev_panel.py ruff: Bump target-version from py38 to py310. 2024-07-13 22:28:22 -07:00
test_integrations.py integrations: Add FIXTURELESS_SCREENSHOT_CONFIG. 2025-06-01 11:38:02 -07:00
test_internet.py
test_invite.py test_invite: Fix a test failing with old databases. 2025-08-08 18:59:37 -07:00
test_legacy_subject.py
test_link_embed.py embeds: Propagate group membership before updating UserMessage flags. 2025-08-13 10:38:40 -07:00
test_management_commands.py confirmation: Replace RealmCreationKey - use Confirmation instead. 2025-08-04 18:41:15 -07:00
test_markdown_thumbnail.py thumbnail: Add a tool to re-thumbnail spinners, or process old images. 2025-04-23 17:41:51 -07:00
test_markdown.py markdown: Remove vestigial Twitter code and cache. 2025-08-27 09:22:56 -07:00
test_mattermost_importer.py test_mattermost_importer: Condition html2text crash on Python version. 2025-08-13 14:11:05 -07:00
test_message_delete.py message: Use .is_channel_message column instead of is_stream_message(). 2025-08-19 23:37:07 -07:00
test_message_dict.py test_message_dict: Add test for checking "subject" field value. 2025-06-19 10:44:37 -07:00
test_message_edit_notifications.py queue: Rename queue_json_publish to queue_json_publish_rollback_unsafe. 2024-12-06 09:23:02 -08:00
test_message_edit.py message_flags: Fix message flags not updating for wildcard mentions. 2025-07-24 11:52:20 -07:00
test_message_fetch.py message: Use .is_channel_message column instead of is_stream_message(). 2025-08-19 23:37:07 -07:00
test_message_flags.py messages: Add unread 1:1/self DMs to pm_dict if DM group exists. 2025-06-05 17:03:49 -07:00
test_message_move_stream.py stream_settings: Add new disable_topics option to topics_policy. 2025-07-09 14:25:53 -07:00
test_message_move_topic.py message_move: Mark notification messages as read for acting user. 2025-08-05 15:27:08 -07:00
test_message_notification_emails.py notification: Use existing email format for missed 1:1 DM via DM group. 2025-07-24 16:41:52 -07:00
test_message_report.py streams: Handle empty topic only streams being used for announcements. 2025-07-22 16:59:47 -07:00
test_message_send.py stream_settings: Add new disable_topics option to topics_policy. 2025-07-09 14:25:53 -07:00
test_message_summary.py test_message_summary: Fix failing tests. 2025-02-28 12:10:16 +05:30
test_message_topics.py test_message_topics: Optimize test by limiting fetch_event_types. 2025-03-28 09:24:47 -07:00
test_messages.py direct_message_group: Add new group_size field. 2024-08-23 11:09:41 -07:00
test_middleware.py test_middleware: Remove help related tests. 2025-08-08 11:59:29 -07:00
test_migration_status.py migration_status: Refactor parse_migration_status. 2025-03-20 10:57:54 -07:00
test_migrations.py CVE-2024-27286: Delete dangling UserMessage rows. 2024-03-19 18:22:24 -04:00
test_mirror_users.py zephyr: Switch from py3dns to dnspython. 2025-02-25 11:53:08 -08:00
test_muted_users.py variables: Correct instances of misspelled 'message'. 2025-04-16 13:17:19 -07:00
test_navigation_views.py navigation_views: Add backend for navigation views in left sidebar. 2025-05-23 16:25:08 -07:00
test_new_users.py streams: Handle empty topic only streams being used for announcements. 2025-07-22 16:59:47 -07:00
test_notification_data.py mention: Do not include deactivated users in group mention data. 2024-10-10 11:37:44 -07:00
test_onboarding_steps.py onboarding_steps: Add 'navigation_tour_video' for new users. 2025-03-13 14:38:16 -07:00
test_onboarding.py
test_openapi.py api_docs: Update get-file-temporary-url endpoint and add to sidebar. 2025-08-29 10:21:42 -07:00
test_outgoing_http.py requirements: Upgrade Python requirements. 2024-09-24 19:27:21 -07:00
test_outgoing_webhook_interfaces.py avatar: Add option to disable gravatars per realm. 2025-01-30 18:46:02 -08:00
test_outgoing_webhook_system.py url_encoding: Add support for with message links. 2025-06-30 11:19:00 -07:00
test_populate_db.py stream: Add subscriber_count field. 2025-05-13 17:36:53 -07:00
test_presence.py presence: Fix for last active time for invisible mode. 2025-02-26 12:51:57 -08:00
test_push_notifications.py push_notification: Remove 'content_truncated' field from FCM payload. 2025-08-05 16:54:22 -07:00
test_push_registration.py push_notifications: Remove vestiges of base64 storage of tokens. 2025-07-16 16:59:58 -07:00
test_queue_worker.py email-mirror: Add a standalone server that processes incoming email. 2025-05-19 16:39:44 -07:00
test_queue.py queue: Rename queue_json_publish to queue_json_publish_rollback_unsafe. 2024-12-06 09:23:02 -08:00
test_rate_limiter.py ruff: Fix UP006 Use list instead of List for type annotation. 2024-07-13 22:28:22 -07:00
test_reactions.py message_cache: Skip pickling JSON-encoded string in cache. 2025-08-27 09:22:56 -07:00
test_read_receipts.py refactor: Rename huddle to direct_message_group in non API. 2024-07-04 07:56:31 -07:00
test_realm_domains.py models: Extract zerver.models.realms. 2023-12-16 22:08:44 -08:00
test_realm_emoji.py settings: Add can_add_custom_emoji_group realm setting. 2024-10-13 16:09:04 -07:00
test_realm_export.py export: Add guardrails against generating a dysfunctional export via UI. 2025-03-28 17:44:58 -07:00
test_realm_linkifiers.py audit-log: Move realm event types to AuditLogEventType enum. 2024-09-09 11:50:13 -07:00
test_realm_playgrounds.py code_playground: Add custom playground options in the default_options list. 2025-02-16 17:22:47 -08:00
test_realm.py bots: Add a setting to customize the Welcome Bot message. 2025-08-08 18:59:37 -07:00
test_recipient_parsing.py scheduled_messages: Migrate to typed_endpoint. 2024-08-20 10:03:22 -07:00
test_redis_utils.py mypy: Enable new error explicit-override. 2023-10-12 12:28:41 -07:00
test_reminders.py reminders: Stop interpolating user-provided values in format string. 2025-08-27 12:07:21 -07:00
test_report.py zerver: Remove now-unused report/ endpoints. 2023-05-09 13:16:28 -07:00
test_retention.py message: Use .is_channel_message column instead of is_stream_message(). 2025-08-19 23:37:07 -07:00
test_rocketchat_importer.py import: Send channel Welcome Bot messages to imported organizations. 2025-07-21 11:08:25 -07:00
test_saved_snippets.py api: Update saved snippets edit endpoint. 2025-03-17 11:03:25 -07:00
test_scheduled_messages.py scheduled_messages: Set read_by_sender for self-DMs using DM group. 2025-07-21 22:46:38 -07:00
test_scim.py scim: Add support for Groups. 2025-08-08 17:29:11 -07:00
test_send_email.py ruff: Fix SIM117 Use a single with statement with multiple contexts. 2024-07-14 13:48:32 -07:00
test_server_settings.py
test_service_bot_system.py worker: Flag messages processed by embedded bot. 2025-01-24 17:56:44 -08:00
test_sessions.py ruff: Fix UP035 Import from collections.abc, typing instead. 2024-07-13 22:28:22 -07:00
test_settings.py settings: Add setting for marking resolved-topic notices as read. 2025-05-13 16:23:21 -07:00
test_signup.py auth: Pass None as default_subdomain to verify the host. 2025-07-28 10:59:38 -07:00
test_slack_importer.py confirmation: Rename REALM_CREATION to NEW_REALM_USER_REGISTRATION. 2025-08-04 18:41:00 -07:00
test_slack_message_conversion.py slack_data_import: Fix incorrect hyperlink conversion. 2024-10-30 09:48:32 -07:00
test_soft_deactivation.py audit-log: Move user event types to AuditLogEventType enum. 2024-09-09 11:50:13 -07:00
test_subdomains.py ruff: Fix UP035 Import from collections.abc, typing instead. 2024-07-13 22:28:22 -07:00
test_submessage.py queue: Rename queue_json_publish to queue_json_publish_rollback_unsafe. 2024-12-06 09:23:02 -08:00
test_subs.py test_subs: Add send_new_subscription_messages parameter false test case. 2025-08-27 17:06:31 -07:00
test_subscription_settings.py tests: Move subscription properties test to new file. 2025-06-11 15:41:50 -07:00
test_templates.py css: Use classname instead of div selector for .blocks. 2024-08-13 22:36:35 -07:00
test_thumbnail.py upload: Rename attachment_vips_source, as it's not just for vips_source. 2025-07-29 10:01:40 -07:00
test_timeout.py timeout: Rename to unsafe_timeout. 2024-04-18 11:50:38 -07:00
test_timestamp.py ruff: Fix N818 exception name should be named with an Error suffix. 2022-11-17 16:52:00 -08:00
test_timezone.py test_timezone: Ignore legacy MET, MEST aliases. 2025-08-13 14:11:05 -07:00
test_topic_link_util.py topic_link_util: Support message links in backend. 2025-06-18 13:03:56 -07:00
test_tornado.py test_tornado: Add nocoverage for task cleanup. 2025-02-14 17:04:51 -08:00
test_transfer.py transfer: Upload thumbnails for image files. 2025-08-06 15:46:07 -07:00
test_tusd.py upload: Attempt to guess character set text/* which are served inline. 2025-07-24 22:40:12 -07:00
test_tutorial.py welcome_bot: Support auto-reply for 1:1 DMs using DM groups. 2025-07-21 22:48:01 -07:00
test_typed_endpoint_validators.py zerver: Migrate some files to typed_endpoint. 2024-07-20 15:46:48 -07:00
test_typed_endpoint.py ruff: Enable B008 function-call-in-default-argument. 2024-11-10 22:43:55 -08:00
test_typing.py api: Rename edit typing endpoint to /messages/{message_id}/typing. 2025-02-28 13:20:46 -08:00
test_upload_local.py upload: Rename attachment_vips_source, as it's not just for vips_source. 2025-07-29 10:01:40 -07:00
test_upload_s3.py upload: Serve 0-byte files locally, not from S3. 2025-08-13 14:07:21 -07:00
test_upload.py tests: Clarify why encoding test uses NamedTemporaryFile. 2025-08-06 09:41:44 -07:00
test_url_decoding.py url_decoding: Add parse_narrow_url. 2025-02-24 15:37:40 -08:00
test_url_encoding.py url_encoding: Refactor a encode_user_full_name_and_id. 2025-07-03 14:40:49 -07:00
test_urls.py test_urls: Skip api_docs/unmerged.d/ while testing api doc pages. 2025-08-11 14:37:31 -07:00
test_user_groups.py get_recursive_group_members: Use DISTINCT in the query. 2025-07-22 16:21:05 -07:00
test_user_status.py api: Add administrator endpoint for updating user status. 2025-07-18 17:37:26 -07:00
test_user_topics.py tests: Pass update_fields to all stream.save(). 2025-04-15 10:28:18 -07:00
test_users.py email: Bulk clearing of scheduled emails for multiple users. 2025-07-11 14:15:49 -07:00
test_validators.py validator: Disable WildValue equality comparison. 2025-06-25 11:49:02 -07:00
test_webhooks_common.py integrations: Prevent logging of MissingHTTPEventHeaderError. 2025-06-06 18:06:06 -07:00
test_welcome_bot_custom_message.py welcome-bot: Only send message with custom text when testing. 2025-08-12 00:12:52 -07:00
test_widgets.py ruff: Fix UP006 Use list instead of List for type annotation. 2024-07-13 22:28:22 -07:00
test_zcommand.py zcommand: Rename night->dark and day->light in the color scheme backend. 2024-06-30 22:45:26 -07:00
test_zephyr.py users: Remove unnecessary get_api_key helper. 2025-02-13 12:40:53 -08:00
test_zilencer_analytics.py test_push_notifications: Split AnalyticsBouncerTest to a separate file. 2025-04-17 10:55:05 -07:00
test_zulip_update_announcements.py send_zulip_update_announcements: Log updates in the post-deploy hook. 2025-08-06 09:52:45 -07:00