zulip/zerver/tests
Aditya Bansal f46d098558 schedulemessages: Add handle_deferred_message() to handle requests.
This is responsible for:
1.) Handling all the incoming requests at the
messages endpoint which have defer param set. This is similar to
send_message_backend apart from the fact that instead of really
sending a message it schedules one to be sent later on.
2.) Does some preliminary checks such as validating timestamp for
scheduling a message, prevent scheduling a message in past, ensure
correct format of message to be scheduled.
3.) Extracts time of scheduled delivery from message.
4.) Add tests for the newly introduced function.
5.) timezone: Add get_timezone() to obtain tz object from string.
This helps in obtaining a timezone (tz) object from a timezone
specified as a string. This string needs to be a pytz lib defined
timezone string which we use to specify local timezones of the
users.
2018-01-19 11:33:11 -05: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: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_attachments.py lint: Prevent `self: Any` annotations. 2017-12-08 19:00:18 -08:00
test_audit_log.py zerver/tests: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_auth_backends.py test auth.py: Add tests for json_fetch_api_key function. 2018-01-17 15:15:51 -05:00
test_bots.py embedded bots: Add config data UI. 2018-01-09 11:50:54 -05:00
test_bugdown.py bugdown: Linkify Bitcoin URI. 2018-01-19 06:07:43 -05:00
test_compatibility.py zerver/tests: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_custom_profile_data.py zerver/tests: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_decorators.py test_decorators: Replace the json/fetch_api_key endpoint in tests. 2018-01-08 13:15:52 -05:00
test_docs.py api docs: Document the `DELETE /users/me/subscriptions` endpoint. 2018-01-12 07:30:38 -05:00
test_email_change.py registration: Require an explicit realm on PreregistrationUser. 2017-11-27 14:59:34 -08:00
test_email_log.py zerver/tests: Use python 3 syntax for typing. 2017-11-18 15:35:57 -08:00
test_email_mirror.py zerver/tests/test_email_mirror: Sweep force_str. 2017-12-26 09:09:31 -05:00
test_embedded_bot_system.py zerver/tests: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_event_queue.py zerver/tests: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_events.py tests: Replace api_auth usages with auth methods in zerver/tests. 2017-12-18 09:24:09 -05:00
test_export.py zerver/tests: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_external.py tests: Replace api_auth usages with auth methods in zerver/tests. 2017-12-18 09:24:09 -05:00
test_home.py settings: Limit the creation of generic bots. 2018-01-02 18:12:22 -05:00
test_hotspots.py zerver/tests: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_i18n.py Renamed 'Register' to 'Sign up' including translations 2017-12-18 10:02:15 -05:00
test_json_encoder_for_html.py zerver: Remove simplejson dependency. 2017-11-21 21:51:48 -08:00
test_link_embed.py python: Wrap long def lines in test files. 2017-11-16 22:00:53 -08:00
test_logging_handlers.py errors tests: Deduplicate and isolate the magical part. 2017-12-22 11:52:13 -05:00
test_management_commands.py zerver/tests: Use python 3 syntax for typing (part 4). 2017-11-21 22:01:19 -08:00
test_message_edit_notifications.py python: Wrap long def lines in test files. 2017-11-16 22:00:53 -08:00
test_messages.py schedulemessages: Add handle_deferred_message() to handle requests. 2018-01-19 11:33:11 -05:00
test_middleware.py zerver/tests: Use python 3 syntax for typing. 2017-11-18 15:35:57 -08:00
test_muting.py tests: Replace api_auth usages with auth methods in zerver/tests. 2017-12-18 09:24:09 -05:00
test_narrow.py messages: Add option to limit users message history. 2018-01-02 13:45:01 -05:00
test_new_users.py models: Replace core team with Realm.INITIAL_PRIVATE_STREAM_NAME. 2017-11-21 17:39:51 -08:00
test_notifications.py python: Wrap long def lines in test files. 2017-11-16 22:00:53 -08:00
test_outgoing_webhook_interfaces.py zerver/tests: Use python 3 syntax for typing in most files. 2017-11-16 21:52:01 -08:00
test_outgoing_webhook_system.py python: Wrap long def lines in test files. 2017-11-16 22:00:53 -08:00
test_presence.py tests: Replace api_auth usages with auth methods in zerver/tests. 2017-12-18 09:24:09 -05:00
test_push_notifications.py push notifs: Include same stream and sender info on GCM as on APNs. 2017-12-18 15:32:56 -08:00
test_queue_worker.py email-worker: Create EmailSendingWorker. 2017-12-20 19:36:27 -08:00
test_reactions.py tests: Replace api_auth usages with auth methods in zerver/tests. 2017-12-18 09:24:09 -05:00
test_realm.py models: Add ScheduledEmail.realm. 2017-12-19 17:46:36 -08:00
test_realm_domains.py tests: Pass a realm option to login for non-zulip realms. 2017-11-17 15:32:42 -08:00
test_realm_emoji.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_realm_filters.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_report.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_retention.py Eliminate get_user_profile_by_email from test_classes. 2017-11-26 15:47:56 -08:00
test_service_bot_system.py bot_config.py: Add function for loading config file templates. 2018-01-07 20:05:52 +01:00
test_sessions.py tests: Pass a realm option to login for non-zulip realms. 2017-11-17 15:32:42 -08:00
test_settings.py settings: Remove autoscroll_forever setting. 2018-01-02 10:35:49 -05:00
test_signup.py models: Add ScheduledEmail.realm. 2017-12-19 17:46:36 -08:00
test_slack_message_conversion.py slack importer: Add unit tests for slack message conversions. 2018-01-17 09:38:53 -05:00
test_soft_deactivation.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_subdomains.py zerver/tests: Use python 3 syntax for typing (part 4). 2017-11-21 22:01:19 -08:00
test_subs.py tests: Replace api_auth usages with auth methods in zerver/tests. 2017-12-18 09:24:09 -05:00
test_templates.py password reset: Simplify password reset form logic. 2017-11-20 10:40:33 -08:00
test_timestamp.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_tornado.py zerver/tests: Use python 3 syntax for typing. 2017-11-18 15:41:16 -08:00
test_tutorial.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_type_debug.py python: Wrap long def lines in test files. 2017-11-16 22:00:53 -08:00
test_typing.py tests: Replace api_auth usages with auth methods in zerver/tests. 2017-12-18 09:24:09 -05:00
test_unread.py messages: Add option to limit users message history. 2018-01-02 13:45:01 -05:00
test_upload.py tests: Add test coverage for uploading avatars to S3UploadBackend. 2017-12-26 09:09:31 -05:00
test_urls.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_user_groups.py user_groups: Fix reporting of empty user groups. 2017-11-29 16:13:55 -08:00
test_users.py models: Add ScheduledEmail.realm. 2017-12-19 17:46:36 -08:00
test_zephyr.py zerver/tests: Use python 3 syntax for typing (part 3). 2017-11-21 22:01:19 -08:00
tests.py retention-period: Add retention period to front-end admin organization settings. 2017-03-25 17:57:18 -07:00