zulip/zerver/tests
Jack Weatherilt 3396cfc2ef refactoring: Replaced occurences of create_stream_if_needed.
Issue #2088 asked for a wrapper to be created for
`create_stream_if_needed` (called `ensure_stream`) for the 25 times that
`create_stream_if_needed` is called and ignores whether the stream was
created. This commit replaces relevant occurences of
`create_stream_if_needed` with `ensure_stream`, including imports.

The changes weren't significant enough to add any tests or do any
additional manual testing.

The refactoring intended to make the API easier to use in most cases.
The majority of uses of `create_stream_if_needed` ignored the second
parameter.

Fixes: #2088.
2018-03-21 16:47:36 -07:00
..
images uploads: Convert CMYK to RGB when saving avatar/realm icon as png. 2018-03-02 12:57:22 -08:00
__init__.py
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 refactoring: Replaced occurences of create_stream_if_needed. 2018-03-21 16:47:36 -07:00
test_bots.py mypy: Use centralized Validator in request.pyi & validator.py. 2018-03-16 13:30:32 -07:00
test_bugdown.py emoji: Migrate realm emoji to be addressed by `id` rather than `name`. 2018-03-20 22:24:44 -07: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 populate_db: Remove the `test_suite` check for custom profile fields. 2018-03-21 16:05:31 -07:00
test_decorators.py decorator: Improve error message for a deactivated organization. 2018-03-16 16:59:02 -07:00
test_docs.py auth: Redirect to an error page instead of 500. 2018-02-20 22:34:53 -08:00
test_email_change.py settings: Allow admin to change email/name even if it is disabled in realm. 2018-03-02 12:17:00 -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 Add stream ids to urls for stream-related narrows. 2018-02-19 09:03:11 -08:00
test_embedded_bot_system.py embedded bots: Test that BotHandler.initialize is called. 2018-02-28 12:31:38 -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 zerver/tests/test_events: Fix `test_custom_profile_fields_events` tests. 2018-03-21 16:05:31 -07: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_feedback.py Add basic test for FeedbackBot. 2018-03-04 13:31:33 -08:00
test_home.py emails: Add backend for disallowing disposable email addresses. 2018-03-11 22:05:58 -07:00
test_hotspots.py hotspots: Add ALWAYS_SEND_ALL_HOTSPOTS in dev_settings. 2018-03-19 10:39:43 -07: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 bugdown: Do only image preview if relative URL. 2018-03-06 13:50:02 -08:00
test_logging_handlers.py mypy: Re-annotate capture_and_throw in terms of ViewFuncT. 2018-03-17 23:25:05 +00:00
test_management_commands.py management command: Add unit test for MultipleObjectsReturned case. 2018-03-18 22:50:03 -07: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 messages: Add unit test for get_raw_unread_data. 2018-03-19 10:36:26 -07: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 search: Return info flags in payload. 2018-03-15 12:36:06 -07: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 emoji: Migrate realm emoji to be addressed by `id` rather than `name`. 2018-03-20 22:24:44 -07: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 Add stream ids to urls for stream-related narrows. 2018-02-19 09:03:11 -08:00
test_presence.py notifications: Fix missed-message emails for presence-idle users. 2018-03-16 16:30:23 -07:00
test_push_notifications.py bugdown: Remove email from rendered content of messages with mentions. 2018-03-04 20:04:27 -08:00
test_queue.py queue: Don't blow up when a connection closes quickly. 2018-03-20 16:49:05 -07:00
test_queue_worker.py Add tests for SignupWorker error handling. 2018-02-28 12:31:38 -08:00
test_reactions.py emoji: Migrate realm emoji to be addressed by `id` rather than `name`. 2018-03-20 22:24:44 -07:00
test_realm.py realm: Clean up use of "Realm" in more user-facing strings. 2018-03-16 16:59:01 -07:00
test_realm_domains.py models: Make email_allowed_for_realm raise exception. 2018-03-15 14:35:24 -07:00
test_realm_emoji.py emoji: Fix the filtering condition in `check_emoji_admin()`. 2018-03-20 22:24:44 -07:00
test_realm_filters.py i18n: Fix use of 'realm administrator' in translated strings. 2018-03-07 17:15:29 -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 backend: Call real endpoint in create_test_bot(). 2018-02-09 12:30:24 -08: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: Change error for "no data" to something more friendly. 2018-01-23 14:38:59 -05:00
test_signup.py auth.py: Make redirects to 'next' url work for google and github. 2018-03-21 13:35:44 -07:00
test_slack_importer.py slack importer: Move output folder being extracted from /tmp to var/. 2018-03-16 11:12:58 -07:00
test_slack_message_conversion.py slack importer: Add test for checking link in message conversion. 2018-02-05 14:46:39 -08:00
test_soft_deactivation.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_stripe.py billing: Make several small style fixes to new tests. 2018-02-12 12:46:01 -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 refactoring: Replaced occurences of create_stream_if_needed. 2018-03-21 16:47:36 -07:00
test_templates.py emails: Add backend for disallowing disposable email addresses. 2018-03-11 22:05:58 -07:00
test_timestamp.py zerver/tests: Use python 3 syntax for typing. 2017-11-08 12:50:27 -08:00
test_tornado.py Test MessageSenderWorker with Electron as user agent. 2018-02-28 12:31:38 -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 api: Return anchor in get_messages when use_first_unread_anchor=True. 2018-02-16 10:06:20 -08:00
test_upload.py uploads: Make django-sendfile to force downloading attachments. 2018-03-14 11:22:10 -07:00
test_urls.py django-2.0: Shift to resolvers from urlresolvers. 2018-01-30 10:53:54 -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 users: Fix error string for disposable email addresses. 2018-03-16 16:59:01 -07: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