zulip/zerver/tests
Greg Price 9faa44af60 JsonableError: Optionally carry error codes and structured data.
This provides the main infrastructure for fixing #5598.  From here,
it's a matter of on the one hand upgrading exception handlers -- the
many except-blocks in the codebase that look for JsonableError -- to
look beyond the string `msg` and pass on the machine-readable full
error information to their various downstream recipients, and on the
other hand adjusting places where we raise errors to take advantage
of this mechanism to give the errors structured details.

In an ideal future, I think all exception handlers that look (or
should look) for a JsonableError would use its contents in structured
form, never mentioning `msg`; but the majority of error sites might
continue to just instantiate JsonableError with a string message.  The
latter is the simplest thing to do, and probably most error types will
never have code looking for them specifically.

Because the new API refactors the `to_json_error_msg` method which was
designed for subclasses to override, update the 4 subclasses that did
so to take full advantage of the new API instead.
2017-07-24 16:41:22 -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 Replace othello@zulip.com with example_email('othello'). 2017-05-24 19:37:36 -07:00
test_attachments.py tests: Replaced @zulip.com references with self.example_ functions. 2017-05-23 20:59:50 -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 confirmation: Change confirmation keys to have length 24. 2017-07-17 23:18:47 -07:00
test_bots.py test_classes: Use get_user in unsubscribe_from_stream. 2017-07-13 14:13:03 -07:00
test_bugdown.py pep8: Add compliance with rule E261 to tests/test_bugdown.py. 2017-07-11 15:17:32 -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: Remove redundant tests for api_key_only_webhook_view. 2017-07-20 10:30:03 -07:00
test_docs.py portico: Add initial why zulip page. 2017-07-19 11:53:06 -07:00
test_email_change.py confirmation: Remove ConfirmationManager. 2017-07-17 23:18:47 -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 Revert commits related to client_message_id. 2017-07-14 12:13:35 -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 tests: Replace mit_user().email with mit_email(). 2017-05-24 12:44:43 -07:00
test_home.py org-permissions: Add allow_edit_history organiztion setting. 2017-07-16 10:10:06 -07:00
test_hotspots.py hotspots: Change hotspots to have a name and a description. 2017-06-13 12:59:33 -07:00
test_i18n.py JsonableError: Optionally carry error codes and structured data. 2017-07-24 16:41:22 -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 pep8: Add compliance with rule E261 test_logging_handlers.py. 2017-06-04 15:07:26 +05:30
test_management_commands.py confirmation: Change confirmation keys to have length 24. 2017-07-17 23:18:47 -07:00
test_messages.py org-permissions: Add allow_edit_history organiztion setting. 2017-07-16 10:10:06 -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 search: Add test case for searching for a link. 2017-07-13 09:23:34 -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 emails: Make missed message email come from 'Zulip Missed Messages.' 2017-07-21 14:24:03 -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 Replace othello@zulip.com with example_email('othello'). 2017-05-24 19:37:36 -07:00
test_push_notifications.py JsonableError: Rename message from `error` to `msg`. 2017-07-24 16:41:22 -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 urls: Use POST for zerver.views.realm_emoji.upload_emoji. 2017-07-07 10:31:43 -07:00
test_realm.py models: Replace ScheduledJob with ScheduledEmail. 2017-07-17 16:05:38 -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: Replace get_user_profile_by_email. 2017-07-13 00:45:24 +05:30
test_realm_filters.py tests: Replaced @zulip.com references with self.example_ functions. 2017-05-23 20:59:50 -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 test_settings: Refactor to use UserProfile property_types framework. 2017-07-18 15:49:20 -07:00
test_signup.py registration: Remove organization type selection in realm creation. 2017-07-21 13:09:06 -07:00
test_subs.py actions: Start logging subscription activities in RealmAuditLog. 2017-07-17 17:23:41 -07:00
test_templates.py Change product page nav and hero styling. 2017-07-17 16:12:36 -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 Replace othello@zulip.com with example_email('othello'). 2017-05-24 19:37:36 -07:00
test_unread.py pep8: Add compliance with rule E261 test_unread.py. 2017-06-04 15:07:39 +05:30
test_upload.py Make user_id, realm_id mandatory in _get_unversioned_avatar_url. 2017-07-17 21:01:30 +00:00
test_urls.py pep8: Add compliance with rule E261 to test_urls.py. 2017-05-18 03:00:32 +05:30
test_users.py models: Replace ScheduledJob with ScheduledEmail. 2017-07-17 16:05:38 -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