From 0fd99886a2b617625d0f375d084b07b716a43520 Mon Sep 17 00:00:00 2001 From: Karl Hobley Date: Thu, 17 Mar 2022 14:37:24 +0000 Subject: [PATCH] Move tests to test --- .circleci/config.yml | 10 +++---- conftest.py | 6 ++-- docs/advanced_topics/testing.rst | 8 +++--- docs/conf.py | 2 +- docs/contributing/developing.rst | 14 +++++----- docs/releases/2.0.rst | 2 +- runtests.py | 4 +-- wagtail/admin/tests/api/test_pages.py | 4 +-- wagtail/admin/tests/api/utils.py | 2 +- wagtail/admin/tests/benches.py | 6 ++-- .../test_bulk_actions/test_bulk_action.py | 2 +- .../test_bulk_actions/test_bulk_delete.py | 4 +-- .../pages/test_bulk_actions/test_bulk_move.py | 4 +-- .../test_bulk_actions/test_bulk_publish.py | 4 +-- .../test_bulk_actions/test_bulk_unpublish.py | 4 +-- .../tests/pages/test_content_type_use_view.py | 4 +-- .../admin/tests/pages/test_convert_alias.py | 4 +-- wagtail/admin/tests/pages/test_copy_page.py | 4 +-- wagtail/admin/tests/pages/test_create_page.py | 4 +-- wagtail/admin/tests/pages/test_dashboard.py | 4 +-- wagtail/admin/tests/pages/test_delete_page.py | 4 +-- wagtail/admin/tests/pages/test_edit_page.py | 6 ++-- .../admin/tests/pages/test_explorer_view.py | 4 +-- wagtail/admin/tests/pages/test_moderation.py | 4 +-- wagtail/admin/tests/pages/test_move_page.py | 4 +-- .../admin/tests/pages/test_page_locking.py | 4 +-- wagtail/admin/tests/pages/test_page_search.py | 4 +-- wagtail/admin/tests/pages/test_preview.py | 9 ++---- wagtail/admin/tests/pages/test_revisions.py | 4 +-- .../admin/tests/pages/test_unpublish_page.py | 4 +-- wagtail/admin/tests/pages/test_view_draft.py | 4 +-- .../tests/pages/test_workflow_history.py | 2 +- .../admin/tests/test_account_management.py | 2 +- wagtail/admin/tests/test_admin_search.py | 2 +- wagtail/admin/tests/test_audit_log.py | 4 +-- wagtail/admin/tests/test_buttons_hooks.py | 2 +- wagtail/admin/tests/test_collections_views.py | 2 +- wagtail/admin/tests/test_compare.py | 2 +- wagtail/admin/tests/test_edit_handlers.py | 10 +++---- wagtail/admin/tests/test_filters.py | 2 +- wagtail/admin/tests/test_jinja2.py | 2 +- wagtail/admin/tests/test_menu.py | 2 +- wagtail/admin/tests/test_moderation_list.py | 4 +-- wagtail/admin/tests/test_navigation.py | 2 +- wagtail/admin/tests/test_page_chooser.py | 4 +-- wagtail/admin/tests/test_password_reset.py | 2 +- wagtail/admin/tests/test_privacy.py | 4 +-- wagtail/admin/tests/test_reports_views.py | 2 +- wagtail/admin/tests/test_rich_text.py | 20 ++++++------- wagtail/admin/tests/test_site_summary.py | 4 +-- wagtail/admin/tests/test_templatetags.py | 2 +- wagtail/admin/tests/test_userbar.py | 4 +-- wagtail/admin/tests/test_views.py | 2 +- wagtail/admin/tests/test_widgets.py | 4 +-- wagtail/admin/tests/test_workflows.py | 4 +-- wagtail/admin/tests/tests.py | 4 +-- wagtail/admin/tests/ui/test_sidebar.py | 2 +- wagtail/api/v2/tests/test_pages.py | 6 ++-- wagtail/contrib/forms/tests/test_forms.py | 2 +- wagtail/contrib/forms/tests/test_models.py | 4 +-- wagtail/contrib/forms/tests/test_views.py | 4 +-- wagtail/contrib/forms/tests/utils.py | 2 +- wagtail/contrib/frontend_cache/tests.py | 8 +++--- .../tests/test_modeladmin_edit_handlers.py | 6 ++-- .../modeladmin/tests/test_page_modeladmin.py | 4 +-- .../modeladmin/tests/test_search_handlers.py | 2 +- .../tests/test_simple_modeladmin.py | 10 +++---- .../tests/test_import_admin_views.py | 2 +- .../contrib/redirects/tests/test_redirects.py | 4 +-- .../redirects/tests/test_reports_view.py | 2 +- .../redirects/tests/test_signal_handlers.py | 6 ++-- wagtail/contrib/routable_page/tests.py | 2 +- wagtail/contrib/search_promotions/tests.py | 2 +- wagtail/contrib/settings/tests/base.py | 2 +- wagtail/contrib/settings/tests/test_admin.py | 4 +-- wagtail/contrib/settings/tests/test_forms.py | 2 +- wagtail/contrib/settings/tests/test_model.py | 2 +- .../contrib/settings/tests/test_register.py | 4 +-- .../contrib/settings/tests/test_templates.py | 2 +- .../simple_translation/tests/test_forms.py | 4 +-- .../tests/test_migrations.py | 2 +- .../simple_translation/tests/test_views.py | 6 ++-- .../tests/test_wagtail_hooks.py | 4 +-- wagtail/contrib/sitemaps/tests.py | 2 +- wagtail/contrib/styleguide/tests.py | 2 +- wagtail/contrib/table_block/tests.py | 4 +-- wagtail/core/tests/test_audit_log.py | 4 +-- wagtail/core/tests/test_blocks.py | 10 +++---- .../test_collection_permission_policies.py | 2 +- wagtail/core/tests/test_hooks.py | 2 +- wagtail/core/tests/test_jinja2.py | 2 +- wagtail/core/tests/test_locale_model.py | 2 +- .../core/tests/test_management_commands.py | 2 +- wagtail/core/tests/test_page_model.py | 12 ++++---- wagtail/core/tests/test_page_permissions.py | 2 +- wagtail/core/tests/test_page_privacy.py | 2 +- wagtail/core/tests/test_page_queryset.py | 2 +- .../core/tests/test_permission_policies.py | 2 +- wagtail/core/tests/test_rich_text.py | 4 +-- wagtail/core/tests/test_signals.py | 4 +-- wagtail/core/tests/test_streamfield.py | 2 +- wagtail/core/tests/test_tests.py | 8 +++--- wagtail/core/tests/test_translatablemixin.py | 2 +- wagtail/core/tests/test_views.py | 2 +- wagtail/core/tests/test_workflow.py | 2 +- wagtail/core/tests/tests.py | 2 +- wagtail/documents/tests/test_admin_views.py | 4 +-- .../test_bulk_actions/test_bulk_add_tags.py | 2 +- .../test_bulk_add_to_collection.py | 2 +- .../test_bulk_actions/test_bulk_delete.py | 2 +- .../tests/test_collection_privacy.py | 2 +- .../documents/tests/test_document_chooser.py | 2 +- .../documents/tests/test_form_overrides.py | 10 +++---- wagtail/documents/tests/test_models.py | 4 +-- wagtail/documents/tests/test_search.py | 2 +- wagtail/documents/tests/test_views.py | 2 +- wagtail/embeds/tests/test_embeds.py | 2 +- wagtail/images/tests/test_admin_views.py | 14 +++++----- .../test_bulk_actions/test_bulk_add_tags.py | 2 +- .../test_bulk_add_to_collection.py | 2 +- .../test_bulk_actions/test_bulk_delete.py | 2 +- wagtail/images/tests/test_form_overrides.py | 8 +++--- wagtail/images/tests/test_models.py | 6 ++-- wagtail/images/tests/test_rich_text.py | 2 +- wagtail/images/tests/tests.py | 4 +-- wagtail/images/tests/urls.py | 2 +- wagtail/locales/tests.py | 2 +- .../tests/elasticsearch_common_tests.py | 2 +- wagtail/search/tests/test_backends.py | 4 +-- .../tests/test_elasticsearch5_backend.py | 2 +- .../tests/test_elasticsearch6_backend.py | 2 +- .../tests/test_elasticsearch7_backend.py | 2 +- wagtail/search/tests/test_index_functions.py | 6 ++-- wagtail/search/tests/test_indexed_class.py | 4 +-- wagtail/search/tests/test_mysql_backend.py | 2 +- wagtail/search/tests/test_postgres_backend.py | 2 +- .../search/tests/test_postgres_stemming.py | 2 +- wagtail/search/tests/test_queries.py | 2 +- wagtail/search/tests/test_related_fields.py | 4 +-- wagtail/sites/tests.py | 2 +- wagtail/snippets/tests.py | 8 +++--- wagtail/{tests => test}/.gitignore | 0 wagtail/{tests => test}/__init__.py | 0 wagtail/{tests => test}/benchmark.py | 0 wagtail/{tests => test}/context_processors.py | 0 .../{tests => test}/customuser/__init__.py | 0 wagtail/{tests => test}/customuser/fields.py | 0 .../customuser/fixtures/test.json | 0 .../fixtures/test_explorable_pages.json | 0 .../customuser/fixtures/test_specific.json | 0 .../customuser/migrations/0001_initial.py | 0 .../migrations/0002_added_file_field.py | 0 .../migrations/0003_delete_emailuser.py | 0 .../customuser/migrations/__init__.py | 0 wagtail/{tests => test}/customuser/models.py | 0 wagtail/{tests => test}/customuser/tests.py | 2 +- wagtail/test/demosite/__init__.py | 1 + wagtail/{tests => test}/demosite/apps.py | 2 +- .../demosite/fixtures/demosite.json | 0 .../demosite/migrations/0001_initial.py | 0 .../migrations/0002_capitalizeverbose.py | 0 .../0003_blogentrypagetag_fk_for_django_4.py | 0 .../demosite/migrations/__init__.py | 0 wagtail/{tests => test}/demosite/models.py | 0 .../{tests => test}/dummy_external_storage.py | 0 .../{tests => test}/dummy_sendfile_backend.py | 0 wagtail/{tests => test}/emailuser/__init__.py | 0 .../emailuser/fixtures/test.json | 0 .../fixtures/test_explorable_pages.json | 0 .../emailuser/fixtures/test_specific.json | 0 .../emailuser/migrations/0001_initial.py | 0 .../emailuser/migrations/__init__.py | 0 wagtail/{tests => test}/emailuser/models.py | 0 wagtail/{tests => test}/headless_urls.py | 0 wagtail/test/i18n/__init__.py | 1 + wagtail/{tests => test}/i18n/apps.py | 2 +- .../i18n/migrations/0001_initial.py | 0 ...d_clusterabletestmodeltranslatablechild.py | 0 .../i18n/migrations/__init__.py | 0 wagtail/{tests => test}/i18n/models.py | 0 wagtail/{tests => test}/manage.py | 2 +- wagtail/{tests => test}/middleware.py | 0 wagtail/test/modeladmintest/__init__.py | 1 + .../{tests => test}/modeladmintest/apps.py | 2 +- .../fixtures/modeladmintest_test.json | 0 .../{tests => test}/modeladmintest/forms.py | 0 .../modeladmintest/migrations/0001_initial.py | 0 .../modeladmintest/migrations/0002_token.py | 0 .../migrations/0003_publisher.py | 0 .../migrations/0004_venuepage.py | 0 .../migrations/0005_book_cover_image.py | 0 .../0006_contributor_person_visitor.py | 0 .../modeladmintest/migrations/0007_friend.py | 0 .../migrations/0008_solobook.py | 0 .../migrations/0009_relatedlink.py | 0 .../modeladmintest/migrations/__init__.py | 0 .../{tests => test}/modeladmintest/models.py | 0 .../modeladmintest/wagtail_hooks.py | 2 +- wagtail/{tests => test}/non_root_urls.py | 0 wagtail/test/routablepage/__init__.py | 1 + wagtail/{tests => test}/routablepage/apps.py | 2 +- .../routablepage/migrations/0001_initial.py | 0 .../0002_routablepagewithoutindexroutetest.py | 0 .../routablepage/migrations/__init__.py | 0 .../{tests => test}/routablepage/models.py | 0 .../routablepagetests/routable_page_test.html | 0 .../routable_page_test_alternate.html | 0 wagtail/test/search/__init__.py | 1 + wagtail/{tests => test}/search/apps.py | 2 +- .../search/fixtures/search.json | 0 .../search/migrations/0001_initial.py | 0 .../search/migrations/__init__.py | 0 wagtail/{tests => test}/search/models.py | 0 wagtail/{tests => test}/settings.py | 28 +++++++++---------- wagtail/{tests => test}/settings_ui.py | 0 wagtail/test/snippets/__init__.py | 1 + wagtail/{tests => test}/snippets/apps.py | 2 +- wagtail/{tests => test}/snippets/forms.py | 0 .../snippets/migrations/0001_initial.py | 0 .../migrations/0002_searchablesnippet.py | 0 .../0003_fancysnippet_standardsnippet.py | 0 .../migrations/0004_fileuploadsnippet.py | 0 ...isectionrichtextsnippet_richtextsection.py | 0 ...0006_standarsnippetwithcustomprimarykey.py | 0 .../migrations/0007_translatablesnippet.py | 0 .../snippets/migrations/__init__.py | 0 wagtail/{tests => test}/snippets/models.py | 0 wagtail/test/testapp/__init__.py | 1 + wagtail/{tests => test}/testapp/apps.py | 2 +- wagtail/{tests => test}/testapp/blocks.py | 0 .../testapp/fixtures/test.json | 0 .../fixtures/test_explorable_pages.json | 0 .../testapp/fixtures/test_specific.json | 0 wagtail/{tests => test}/testapp/forms.py | 0 .../tests/jinja2/heading_block.html | 0 .../include_block_autoescape_off_test.html | 0 ...de_block_tag_with_additional_variable.html | 0 .../tests/jinja2/include_block_test.html | 0 .../include_block_test_with_filter.html | 0 .../tests/jinja2/paragraph.html | 0 .../tests/jinja2/rich_text.html | 0 .../tests/jinja2/section_block.html | 0 .../jinja2_templates/tests/jinja2/stream.html | 0 .../tests/jinja2/stream_with_language.html | 0 .../jinja2/struct_block_form_template.html | 0 .../{tests => test}/testapp/media_forms.py | 0 .../testapp/migrations/0001_initial.py | 0 .../0002_customimage_collections.py | 0 .../testapp/migrations/0003_onetoonepage.py | 0 .../migrations/0004_fileuploadsetting.py | 0 ...blockfieldpage_defaultrichtextfieldpage.py | 0 ...chtextpage_sectionedrichtextpagesection.py | 0 .../testapp/migrations/0007_jadeformpage.py | 0 ...nlinestreampage_inlinestreampagesection.py | 0 .../migrations/0009_defaultstreampage.py | 0 .../migrations/0010_auto_20160823_1056.py | 0 .../testapp/migrations/0011_userprofile.py | 0 .../0012_panelsettings_tabbedsettings.py | 0 .../migrations/0013_auto_20161220_1957.py | 4 +-- .../migrations/0014_event_categories.py | 0 .../migrations/0015_auto_20170210_2058.py | 0 .../migrations/0016_auto_20170303_2340.py | 0 .../migrations/0017_alwaysshowinmenuspage.py | 0 .../migrations/0018_multiselect_form_field.py | 0 .../0019_richtextfieldwithfeaturespage.py | 0 .../testapp/migrations/0020_customdocument.py | 0 .../migrations/0021_hidden_form_field.py | 0 .../0022_pagewithexcludedcopyfield.py | 0 ..._formpagewithredirect_redirectformfield.py | 0 .../migrations/0024_tableblockstreampage.py | 0 .../0025_advertwithcustomprimarykey.py | 0 .../migrations/0026_auto_20171207_1657.py | 0 .../migrations/0027_auto_20180110_1727.py | 0 .../0028_headcountrelatedmodelusingpk.py | 0 .../migrations/0029_auto_20180215_1950.py | 4 +-- .../0030_formclassadditionalfieldpage.py | 0 .../0031_customdocument_file_size.py | 0 .../migrations/0032_auto_20180505_0008.py | 0 ...033_eventpagespeaker_related_query_name.py | 0 .../0034_advertwithuuidcustomprimarykey.py | 0 .../0035_streamfieldmigrationmodels.py | 0 ...36_streamfieldmigrationmodels_add_field.py | 0 ...0037_customdocument_verbose_name_plural.py | 0 .../0038_singletonpageviamaxcount.py | 0 .../0039_customdocument_description.py | 0 .../0040_customdocument_file_hash.py | 0 .../testapp/migrations/0041_secretpage.py | 0 .../0042_simplechildpage_simpleparentpage.py | 0 .../0043_customdocument_fancy_description.py | 0 .../migrations/0043_eventpagespeakeraward.py | 0 .../migrations/0044_merge_20191203_0116.py | 0 ..._add_formsubmission_verbose_name_plural.py | 0 .../testapp/migrations/0046_personpage.py | 0 .../migrations/0047_restaurant_tags.py | 0 .../testapp/migrations/0048_importantpages.py | 0 .../testapp/migrations/0049_rawhtmlblock.py | 4 +-- ...agewithauthor_customrenditionwithauthor.py | 0 .../migrations/0051_tag_verbose_name.py | 0 .../0052_custom_doc_image_unique_together.py | 0 .../migrations/0053_formfield_clean_name.py | 0 .../testapp/migrations/0054_simpletask.py | 0 .../0055_eventpage_childobject_i18n.py | 0 .../0056_streampage_nested_streamblock.py | 4 +-- .../0057_customdocumentwithauthor.py | 0 ...ountsstreammodel_minmaxcountstreammodel.py | 0 .../migrations/0059_deadlystreampage.py | 4 +-- ...60_taggedchildpage_taggedgrandchildpage.py | 0 .../migrations/0061_tag_fk_for_django_4.py | 0 .../testapp/migrations/__init__.py | 0 wagtail/{tests => test}/testapp/models.py | 0 wagtail/{tests => test}/testapp/rich_text.py | 0 .../testapp/templates/tests/base.html | 0 .../tests/block_forms/link_block.html | 0 .../struct_block_form_template.html | 0 .../templates/tests/blocks/heading_block.html | 0 .../include_block_autoescape_off_test.html | 0 .../tests/blocks/include_block_only_test.html | 0 .../tests/blocks/include_block_test.html | 0 .../include_block_test_with_filter.html | 0 .../tests/blocks/include_block_with_test.html | 0 .../templates/tests/blocks/link_block.html | 0 .../tests/blocks/posts_static_block.html | 0 .../templates/tests/blocks/section_block.html | 0 .../tests/blocks/stream_with_language.html | 0 .../blocks/struct_block_custom_value.html | 0 .../blocks/table_block_with_caption.html | 0 .../templates/tests/business_child.html | 0 .../testapp/templates/tests/event_index.html | 0 .../testapp/templates/tests/event_page.html | 0 .../tests/event_page_password_required.html | 0 .../testapp/templates/tests/form_page.html | 0 .../templates/tests/form_page_landing.html | 0 .../form_page_with_custom_form_builder.html | 0 ...page_with_custom_form_builder_landing.html | 0 .../form_page_with_custom_submission.html | 0 ...m_page_with_custom_submission_landing.html | 0 .../tests/form_page_with_redirect.html | 0 .../form_page_with_redirect_landing.html | 0 .../tests/includes/event_listing.html | 0 .../testapp/templates/tests/simple_page.html | 0 wagtail/{tests => test}/testapp/urls.py | 2 +- wagtail/{tests => test}/testapp/views.py | 0 .../{tests => test}/testapp/wagtail_hooks.py | 0 wagtail/{tests => test}/urls.py | 4 +-- wagtail/{tests => test}/urls_multilang.py | 0 wagtail/{tests => test}/utils/__init__.py | 0 wagtail/{tests => test}/utils/form_data.py | 2 +- wagtail/{tests => test}/utils/page_tests.py | 0 .../{tests => test}/utils/wagtail_tests.py | 0 wagtail/tests/demosite/__init__.py | 1 - wagtail/tests/i18n/__init__.py | 1 - wagtail/tests/modeladmintest/__init__.py | 1 - wagtail/tests/routablepage/__init__.py | 1 - wagtail/tests/search/__init__.py | 1 - wagtail/tests/snippets/__init__.py | 1 - wagtail/tests/testapp/__init__.py | 1 - wagtail/users/tests/test_admin_views.py | 2 +- .../test_bulk_assign_role.py | 2 +- .../test_bulk_actions/test_bulk_delete.py | 2 +- .../test_bulk_set_active_state.py | 2 +- 360 files changed, 317 insertions(+), 322 deletions(-) rename wagtail/{tests => test}/.gitignore (100%) rename wagtail/{tests => test}/__init__.py (100%) rename wagtail/{tests => test}/benchmark.py (100%) rename wagtail/{tests => test}/context_processors.py (100%) rename wagtail/{tests => test}/customuser/__init__.py (100%) rename wagtail/{tests => test}/customuser/fields.py (100%) rename wagtail/{tests => test}/customuser/fixtures/test.json (100%) rename wagtail/{tests => test}/customuser/fixtures/test_explorable_pages.json (100%) rename wagtail/{tests => test}/customuser/fixtures/test_specific.json (100%) rename wagtail/{tests => test}/customuser/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/customuser/migrations/0002_added_file_field.py (100%) rename wagtail/{tests => test}/customuser/migrations/0003_delete_emailuser.py (100%) rename wagtail/{tests => test}/customuser/migrations/__init__.py (100%) rename wagtail/{tests => test}/customuser/models.py (100%) rename wagtail/{tests => test}/customuser/tests.py (96%) create mode 100644 wagtail/test/demosite/__init__.py rename wagtail/{tests => test}/demosite/apps.py (77%) rename wagtail/{tests => test}/demosite/fixtures/demosite.json (100%) rename wagtail/{tests => test}/demosite/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/demosite/migrations/0002_capitalizeverbose.py (100%) rename wagtail/{tests => test}/demosite/migrations/0003_blogentrypagetag_fk_for_django_4.py (100%) rename wagtail/{tests => test}/demosite/migrations/__init__.py (100%) rename wagtail/{tests => test}/demosite/models.py (100%) rename wagtail/{tests => test}/dummy_external_storage.py (100%) rename wagtail/{tests => test}/dummy_sendfile_backend.py (100%) rename wagtail/{tests => test}/emailuser/__init__.py (100%) rename wagtail/{tests => test}/emailuser/fixtures/test.json (100%) rename wagtail/{tests => test}/emailuser/fixtures/test_explorable_pages.json (100%) rename wagtail/{tests => test}/emailuser/fixtures/test_specific.json (100%) rename wagtail/{tests => test}/emailuser/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/emailuser/migrations/__init__.py (100%) rename wagtail/{tests => test}/emailuser/models.py (100%) rename wagtail/{tests => test}/headless_urls.py (100%) create mode 100644 wagtail/test/i18n/__init__.py rename wagtail/{tests => test}/i18n/apps.py (79%) rename wagtail/{tests => test}/i18n/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/i18n/migrations/0002_clusterabletestmodel_clusterabletestmodelchild_clusterabletestmodeltranslatablechild.py (100%) rename wagtail/{tests => test}/i18n/migrations/__init__.py (100%) rename wagtail/{tests => test}/i18n/models.py (100%) rename wagtail/{tests => test}/manage.py (94%) rename wagtail/{tests => test}/middleware.py (100%) create mode 100644 wagtail/test/modeladmintest/__init__.py rename wagtail/{tests => test}/modeladmintest/apps.py (86%) rename wagtail/{tests => test}/modeladmintest/fixtures/modeladmintest_test.json (100%) rename wagtail/{tests => test}/modeladmintest/forms.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0002_token.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0003_publisher.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0004_venuepage.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0005_book_cover_image.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0006_contributor_person_visitor.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0007_friend.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0008_solobook.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/0009_relatedlink.py (100%) rename wagtail/{tests => test}/modeladmintest/migrations/__init__.py (100%) rename wagtail/{tests => test}/modeladmintest/models.py (100%) rename wagtail/{tests => test}/modeladmintest/wagtail_hooks.py (98%) rename wagtail/{tests => test}/non_root_urls.py (100%) create mode 100644 wagtail/test/routablepage/__init__.py rename wagtail/{tests => test}/routablepage/apps.py (85%) rename wagtail/{tests => test}/routablepage/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/routablepage/migrations/0002_routablepagewithoutindexroutetest.py (100%) rename wagtail/{tests => test}/routablepage/migrations/__init__.py (100%) rename wagtail/{tests => test}/routablepage/models.py (100%) rename wagtail/{tests => test}/routablepage/templates/routablepagetests/routable_page_test.html (100%) rename wagtail/{tests => test}/routablepage/templates/routablepagetests/routable_page_test_alternate.html (100%) create mode 100644 wagtail/test/search/__init__.py rename wagtail/{tests => test}/search/apps.py (88%) rename wagtail/{tests => test}/search/fixtures/search.json (100%) rename wagtail/{tests => test}/search/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/search/migrations/__init__.py (100%) rename wagtail/{tests => test}/search/models.py (100%) rename wagtail/{tests => test}/settings.py (92%) rename wagtail/{tests => test}/settings_ui.py (100%) create mode 100644 wagtail/test/snippets/__init__.py rename wagtail/{tests => test}/snippets/apps.py (88%) rename wagtail/{tests => test}/snippets/forms.py (100%) rename wagtail/{tests => test}/snippets/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/snippets/migrations/0002_searchablesnippet.py (100%) rename wagtail/{tests => test}/snippets/migrations/0003_fancysnippet_standardsnippet.py (100%) rename wagtail/{tests => test}/snippets/migrations/0004_fileuploadsnippet.py (100%) rename wagtail/{tests => test}/snippets/migrations/0005_multisectionrichtextsnippet_richtextsection.py (100%) rename wagtail/{tests => test}/snippets/migrations/0006_standarsnippetwithcustomprimarykey.py (100%) rename wagtail/{tests => test}/snippets/migrations/0007_translatablesnippet.py (100%) rename wagtail/{tests => test}/snippets/migrations/__init__.py (100%) rename wagtail/{tests => test}/snippets/models.py (100%) create mode 100644 wagtail/test/testapp/__init__.py rename wagtail/{tests => test}/testapp/apps.py (87%) rename wagtail/{tests => test}/testapp/blocks.py (100%) rename wagtail/{tests => test}/testapp/fixtures/test.json (100%) rename wagtail/{tests => test}/testapp/fixtures/test_explorable_pages.json (100%) rename wagtail/{tests => test}/testapp/fixtures/test_specific.json (100%) rename wagtail/{tests => test}/testapp/forms.py (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/heading_block.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/include_block_autoescape_off_test.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/include_block_tag_with_additional_variable.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/include_block_test.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/include_block_test_with_filter.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/paragraph.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/rich_text.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/section_block.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/stream.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/stream_with_language.html (100%) rename wagtail/{tests => test}/testapp/jinja2_templates/tests/jinja2/struct_block_form_template.html (100%) rename wagtail/{tests => test}/testapp/media_forms.py (100%) rename wagtail/{tests => test}/testapp/migrations/0001_initial.py (100%) rename wagtail/{tests => test}/testapp/migrations/0002_customimage_collections.py (100%) rename wagtail/{tests => test}/testapp/migrations/0003_onetoonepage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0004_fileuploadsetting.py (100%) rename wagtail/{tests => test}/testapp/migrations/0005_customrichblockfieldpage_customrichtextfieldpage_defaultrichblockfieldpage_defaultrichtextfieldpage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0006_sectionedrichtextpage_sectionedrichtextpagesection.py (100%) rename wagtail/{tests => test}/testapp/migrations/0007_jadeformpage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0008_inlinestreampage_inlinestreampagesection.py (100%) rename wagtail/{tests => test}/testapp/migrations/0009_defaultstreampage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0010_auto_20160823_1056.py (100%) rename wagtail/{tests => test}/testapp/migrations/0011_userprofile.py (100%) rename wagtail/{tests => test}/testapp/migrations/0012_panelsettings_tabbedsettings.py (100%) rename wagtail/{tests => test}/testapp/migrations/0013_auto_20161220_1957.py (83%) rename wagtail/{tests => test}/testapp/migrations/0014_event_categories.py (100%) rename wagtail/{tests => test}/testapp/migrations/0015_auto_20170210_2058.py (100%) rename wagtail/{tests => test}/testapp/migrations/0016_auto_20170303_2340.py (100%) rename wagtail/{tests => test}/testapp/migrations/0017_alwaysshowinmenuspage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0018_multiselect_form_field.py (100%) rename wagtail/{tests => test}/testapp/migrations/0019_richtextfieldwithfeaturespage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0020_customdocument.py (100%) rename wagtail/{tests => test}/testapp/migrations/0021_hidden_form_field.py (100%) rename wagtail/{tests => test}/testapp/migrations/0022_pagewithexcludedcopyfield.py (100%) rename wagtail/{tests => test}/testapp/migrations/0023_formpagewithredirect_redirectformfield.py (100%) rename wagtail/{tests => test}/testapp/migrations/0024_tableblockstreampage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0025_advertwithcustomprimarykey.py (100%) rename wagtail/{tests => test}/testapp/migrations/0026_auto_20171207_1657.py (100%) rename wagtail/{tests => test}/testapp/migrations/0027_auto_20180110_1727.py (100%) rename wagtail/{tests => test}/testapp/migrations/0028_headcountrelatedmodelusingpk.py (100%) rename wagtail/{tests => test}/testapp/migrations/0029_auto_20180215_1950.py (88%) rename wagtail/{tests => test}/testapp/migrations/0030_formclassadditionalfieldpage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0031_customdocument_file_size.py (100%) rename wagtail/{tests => test}/testapp/migrations/0032_auto_20180505_0008.py (100%) rename wagtail/{tests => test}/testapp/migrations/0033_eventpagespeaker_related_query_name.py (100%) rename wagtail/{tests => test}/testapp/migrations/0034_advertwithuuidcustomprimarykey.py (100%) rename wagtail/{tests => test}/testapp/migrations/0035_streamfieldmigrationmodels.py (100%) rename wagtail/{tests => test}/testapp/migrations/0036_streamfieldmigrationmodels_add_field.py (100%) rename wagtail/{tests => test}/testapp/migrations/0037_customdocument_verbose_name_plural.py (100%) rename wagtail/{tests => test}/testapp/migrations/0038_singletonpageviamaxcount.py (100%) rename wagtail/{tests => test}/testapp/migrations/0039_customdocument_description.py (100%) rename wagtail/{tests => test}/testapp/migrations/0040_customdocument_file_hash.py (100%) rename wagtail/{tests => test}/testapp/migrations/0041_secretpage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0042_simplechildpage_simpleparentpage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0043_customdocument_fancy_description.py (100%) rename wagtail/{tests => test}/testapp/migrations/0043_eventpagespeakeraward.py (100%) rename wagtail/{tests => test}/testapp/migrations/0044_merge_20191203_0116.py (100%) rename wagtail/{tests => test}/testapp/migrations/0045_add_formsubmission_verbose_name_plural.py (100%) rename wagtail/{tests => test}/testapp/migrations/0046_personpage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0047_restaurant_tags.py (100%) rename wagtail/{tests => test}/testapp/migrations/0048_importantpages.py (100%) rename wagtail/{tests => test}/testapp/migrations/0049_rawhtmlblock.py (89%) rename wagtail/{tests => test}/testapp/migrations/0050_customimagewithauthor_customrenditionwithauthor.py (100%) rename wagtail/{tests => test}/testapp/migrations/0051_tag_verbose_name.py (100%) rename wagtail/{tests => test}/testapp/migrations/0052_custom_doc_image_unique_together.py (100%) rename wagtail/{tests => test}/testapp/migrations/0053_formfield_clean_name.py (100%) rename wagtail/{tests => test}/testapp/migrations/0054_simpletask.py (100%) rename wagtail/{tests => test}/testapp/migrations/0055_eventpage_childobject_i18n.py (100%) rename wagtail/{tests => test}/testapp/migrations/0056_streampage_nested_streamblock.py (92%) rename wagtail/{tests => test}/testapp/migrations/0057_customdocumentwithauthor.py (100%) rename wagtail/{tests => test}/testapp/migrations/0058_blockcountsstreammodel_minmaxcountstreammodel.py (100%) rename wagtail/{tests => test}/testapp/migrations/0059_deadlystreampage.py (90%) rename wagtail/{tests => test}/testapp/migrations/0060_taggedchildpage_taggedgrandchildpage.py (100%) rename wagtail/{tests => test}/testapp/migrations/0061_tag_fk_for_django_4.py (100%) rename wagtail/{tests => test}/testapp/migrations/__init__.py (100%) rename wagtail/{tests => test}/testapp/models.py (100%) rename wagtail/{tests => test}/testapp/rich_text.py (100%) rename wagtail/{tests => test}/testapp/templates/tests/base.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/block_forms/link_block.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/block_forms/struct_block_form_template.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/heading_block.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/include_block_autoescape_off_test.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/include_block_only_test.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/include_block_test.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/include_block_test_with_filter.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/include_block_with_test.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/link_block.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/posts_static_block.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/section_block.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/stream_with_language.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/struct_block_custom_value.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/blocks/table_block_with_caption.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/business_child.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/event_index.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/event_page.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/event_page_password_required.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/form_page.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/form_page_landing.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/form_page_with_custom_form_builder.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/form_page_with_custom_form_builder_landing.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/form_page_with_custom_submission.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/form_page_with_custom_submission_landing.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/form_page_with_redirect.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/form_page_with_redirect_landing.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/includes/event_listing.html (100%) rename wagtail/{tests => test}/testapp/templates/tests/simple_page.html (100%) rename wagtail/{tests => test}/testapp/urls.py (73%) rename wagtail/{tests => test}/testapp/views.py (100%) rename wagtail/{tests => test}/testapp/wagtail_hooks.py (100%) rename wagtail/{tests => test}/urls.py (95%) rename wagtail/{tests => test}/urls_multilang.py (100%) rename wagtail/{tests => test}/utils/__init__.py (100%) rename wagtail/{tests => test}/utils/form_data.py (98%) rename wagtail/{tests => test}/utils/page_tests.py (100%) rename wagtail/{tests => test}/utils/wagtail_tests.py (100%) delete mode 100644 wagtail/tests/demosite/__init__.py delete mode 100644 wagtail/tests/i18n/__init__.py delete mode 100644 wagtail/tests/modeladmintest/__init__.py delete mode 100644 wagtail/tests/routablepage/__init__.py delete mode 100644 wagtail/tests/search/__init__.py delete mode 100644 wagtail/tests/snippets/__init__.py delete mode 100644 wagtail/tests/testapp/__init__.py diff --git a/.circleci/config.yml b/.circleci/config.yml index 273f98c087..ff5e6d5cdc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -60,7 +60,7 @@ jobs: - image: cimg/python:3.8.11-browsers environment: PIPENV_VENV_IN_PROJECT: true - DJANGO_SETTINGS_MODULE: wagtail.tests.settings_ui + DJANGO_SETTINGS_MODULE: wagtail.test.settings_ui steps: - checkout - attach_workspace: @@ -87,13 +87,13 @@ jobs: key: ui_tests-npm_integration-v1-{{ checksum "client/tests/integration/package-lock.json" }} paths: - client/tests/integration/node_modules - - run: pipenv run ./wagtail/tests/manage.py migrate + - run: pipenv run ./wagtail/test/manage.py migrate - run: - command: pipenv run ./wagtail/tests/manage.py runserver 0:8000 + command: pipenv run ./wagtail/test/manage.py runserver 0:8000 background: true - - run: pipenv run ./wagtail/tests/manage.py createcachetable + - run: pipenv run ./wagtail/test/manage.py createcachetable - run: - command: pipenv run ./wagtail/tests/manage.py createsuperuser --noinput + command: pipenv run ./wagtail/test/manage.py createsuperuser --noinput environment: DJANGO_SUPERUSER_EMAIL: admin@example.com DJANGO_SUPERUSER_USERNAME: admin diff --git a/conftest.py b/conftest.py index 05f7916aed..65b41cdd29 100644 --- a/conftest.py +++ b/conftest.py @@ -45,7 +45,7 @@ def pytest_configure(config): # Setup django after processing the pytest arguments so that the env # variables are available in the settings - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wagtail.tests.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wagtail.test.settings") django.setup() # Activate a language: This affects HTTP header HTTP_ACCEPT_LANGUAGE sent by @@ -54,14 +54,14 @@ def pytest_configure(config): translation.activate("en") - from wagtail.tests.settings import MEDIA_ROOT, STATIC_ROOT + from wagtail.test.settings import MEDIA_ROOT, STATIC_ROOT shutil.rmtree(STATIC_ROOT, ignore_errors=True) shutil.rmtree(MEDIA_ROOT, ignore_errors=True) def pytest_unconfigure(config): - from wagtail.tests.settings import MEDIA_ROOT, STATIC_ROOT + from wagtail.test.settings import MEDIA_ROOT, STATIC_ROOT shutil.rmtree(STATIC_ROOT, ignore_errors=True) shutil.rmtree(MEDIA_ROOT, ignore_errors=True) diff --git a/docs/advanced_topics/testing.rst b/docs/advanced_topics/testing.rst index 6597c61b5e..e2e4672446 100644 --- a/docs/advanced_topics/testing.rst +++ b/docs/advanced_topics/testing.rst @@ -6,7 +6,7 @@ Testing your Wagtail site Wagtail comes with some utilities that simplify writing tests for your site. -.. automodule:: wagtail.tests.utils +.. automodule:: wagtail.test.utils WagtailPageTests @@ -18,7 +18,7 @@ WagtailPageTests .. code-block:: python - from wagtail.tests.utils import WagtailPageTests + from wagtail.test.utils import WagtailPageTests from myapp.models import MyPage class MyPageTests(WagtailPageTests): @@ -45,7 +45,7 @@ WagtailPageTests .. code-block:: python - from wagtail.tests.utils.form_data import nested_form_data, streamfield + from wagtail.test.utils.form_data import nested_form_data, streamfield def test_can_create_content_page(self): # Get the HomePage @@ -94,7 +94,7 @@ WagtailPageTests Form data helpers ================= -.. automodule:: wagtail.tests.utils.form_data +.. automodule:: wagtail.test.utils.form_data .. autofunction:: nested_form_data diff --git a/docs/conf.py b/docs/conf.py index 794f06f797..cc1e450f11 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,7 +39,7 @@ sys.path.insert(0, os.path.abspath("..")) # Autodoc may need to import some models modules which require django settings # be configured -os.environ["DJANGO_SETTINGS_MODULE"] = "wagtail.tests.settings" +os.environ["DJANGO_SETTINGS_MODULE"] = "wagtail.test.settings" django.setup() # Use SQLite3 database engine so it doesn't attempt to use psycopg2 on RTD diff --git a/docs/contributing/developing.rst b/docs/contributing/developing.rst index cffc7bcf8a..ff389f9c3e 100644 --- a/docs/contributing/developing.rst +++ b/docs/contributing/developing.rst @@ -102,7 +102,7 @@ You can create migrations for the test app by running the following from the Wag .. code-block:: console - $ django-admin makemigrations --settings=wagtail.tests.settings + $ django-admin makemigrations --settings=wagtail.test.settings Testing against PostgreSQL @@ -188,12 +188,12 @@ Our end-to-end browser testing suite also uses `Jest `_, com .. code-block:: console - $ export DJANGO_SETTINGS_MODULE=wagtail.tests.settings_ui + $ export DJANGO_SETTINGS_MODULE=wagtail.test.settings_ui $ # Assumes the current environment contains a valid installation of Wagtail for local development. - $ ./wagtail/tests/manage.py migrate - $ ./wagtail/tests/manage.py createcachetable - $ DJANGO_SUPERUSER_EMAIL=admin@example.com DJANGO_SUPERUSER_USERNAME=admin DJANGO_SUPERUSER_PASSWORD=changeme ./wagtail/tests/manage.py createsuperuser --noinput - $ ./wagtail/tests/manage.py runserver 0:8000 + $ ./wagtail/test/manage.py migrate + $ ./wagtail/test/manage.py createcachetable + $ DJANGO_SUPERUSER_EMAIL=admin@example.com DJANGO_SUPERUSER_USERNAME=admin DJANGO_SUPERUSER_PASSWORD=changeme ./wagtail/test/manage.py createsuperuser --noinput + $ ./wagtail/test/manage.py runserver 0:8000 $ npm --prefix client/tests/integration install $ npm run test:integration @@ -289,7 +289,7 @@ Wagtail’s UI component library is built with `Storybook ", + "model=", handler_handler_repr, ) self.assertIn("instance=None", handler_handler_repr) @@ -615,7 +615,7 @@ class TestFieldPanel(TestCase): field_panel_repr = repr(field_panel) self.assertIn( - "model=", field_panel_repr + "model=", field_panel_repr ) self.assertIn("instance=None", field_panel_repr) self.assertIn("request=", field_panel_repr) diff --git a/wagtail/admin/tests/test_filters.py b/wagtail/admin/tests/test_filters.py index 725279a271..99fb63ffbf 100644 --- a/wagtail/admin/tests/test_filters.py +++ b/wagtail/admin/tests/test_filters.py @@ -4,7 +4,7 @@ from django.contrib.auth.models import Group from django.test import TestCase from wagtail.admin.filters import FilteredModelChoiceField -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils User = get_user_model() diff --git a/wagtail/admin/tests/test_jinja2.py b/wagtail/admin/tests/test_jinja2.py index f0c6c65c53..f9deb724c3 100644 --- a/wagtail/admin/tests/test_jinja2.py +++ b/wagtail/admin/tests/test_jinja2.py @@ -4,7 +4,7 @@ from django.template import engines from django.test import TestCase from wagtail.core.models import PAGE_TEMPLATE_VAR, Page, Site -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestCoreJinja(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_menu.py b/wagtail/admin/tests/test_menu.py index 403d4613f0..ee1fb7ca9e 100644 --- a/wagtail/admin/tests/test_menu.py +++ b/wagtail/admin/tests/test_menu.py @@ -4,7 +4,7 @@ from django.urls import reverse from wagtail.admin.menu import AdminOnlyMenuItem, Menu, MenuItem, SubmenuMenuItem from wagtail.admin.ui import sidebar from wagtail.core import hooks -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils def menu_item_hook(*args, cls=MenuItem, **kwargs): diff --git a/wagtail/admin/tests/test_moderation_list.py b/wagtail/admin/tests/test_moderation_list.py index 0ac1045007..a890244bd3 100644 --- a/wagtail/admin/tests/test_moderation_list.py +++ b/wagtail/admin/tests/test_moderation_list.py @@ -3,8 +3,8 @@ from django.test import TestCase from django.urls import reverse from wagtail.core.models import GroupPagePermission, Page -from wagtail.tests.testapp.models import SimplePage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import SimplePage +from wagtail.test.utils import WagtailTestUtils class TestModerationList(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_navigation.py b/wagtail/admin/tests/test_navigation.py index 414cc26723..ad0c71a438 100644 --- a/wagtail/admin/tests/test_navigation.py +++ b/wagtail/admin/tests/test_navigation.py @@ -7,7 +7,7 @@ from wagtail.admin.navigation import ( get_explorable_root_page, get_pages_with_direct_explore_permission, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestExplorablePages(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_page_chooser.py b/wagtail/admin/tests/test_page_chooser.py index 6f343f21af..64333204fe 100644 --- a/wagtail/admin/tests/test_page_chooser.py +++ b/wagtail/admin/tests/test_page_chooser.py @@ -7,13 +7,13 @@ from django.utils.http import urlencode from wagtail.admin.views.chooser import can_choose_page from wagtail.core.models import Locale, Page, UserPagePermissionsProxy -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( EventIndex, EventPage, SimplePage, SingleEventPage, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestChooserBrowse(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_password_reset.py b/wagtail/admin/tests/test_password_reset.py index 317527de95..58fa11493e 100644 --- a/wagtail/admin/tests/test_password_reset.py +++ b/wagtail/admin/tests/test_password_reset.py @@ -5,7 +5,7 @@ from django.core import mail from django.test import TestCase, override_settings from django.urls import reverse -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestUserPasswordReset(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_privacy.py b/wagtail/admin/tests/test_privacy.py index a8a54e4b16..6786aefaed 100644 --- a/wagtail/admin/tests/test_privacy.py +++ b/wagtail/admin/tests/test_privacy.py @@ -3,8 +3,8 @@ from django.test import TestCase from django.urls import reverse from wagtail.core.models import Page, PageViewRestriction -from wagtail.tests.testapp.models import SimplePage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import SimplePage +from wagtail.test.utils import WagtailTestUtils class TestSetPrivacyView(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_reports_views.py b/wagtail/admin/tests/test_reports_views.py index 54c426b638..9926641bde 100644 --- a/wagtail/admin/tests/test_reports_views.py +++ b/wagtail/admin/tests/test_reports_views.py @@ -12,7 +12,7 @@ from openpyxl import load_workbook from wagtail.admin.views.mixins import ExcelDateFormatter from wagtail.core.models import Page, PageLogEntry -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestLockedPagesView(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_rich_text.py b/wagtail/admin/tests/test_rich_text.py index e0024bd86b..4bdd12c71b 100644 --- a/wagtail/admin/tests/test_rich_text.py +++ b/wagtail/admin/tests/test_rich_text.py @@ -12,9 +12,9 @@ from wagtail.admin.rich_text.editors.draftail.features import Feature from wagtail.core.blocks import RichTextBlock from wagtail.core.models import Page, get_page_models from wagtail.core.rich_text import RichText -from wagtail.tests.testapp.models import SingleEventPage -from wagtail.tests.testapp.rich_text import CustomRichTextArea, LegacyRichTextArea -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import SingleEventPage +from wagtail.test.testapp.rich_text import CustomRichTextArea, LegacyRichTextArea +from wagtail.test.utils import WagtailTestUtils class BaseRichTextEditHandlerTestCase(TestCase): @@ -24,7 +24,7 @@ class BaseRichTextEditHandlerTestCase(TestCase): cached edit handlers should be cleared before and after each test run to ensure that no changes leak through to other tests. """ - from wagtail.tests.testapp.models import DefaultRichBlockFieldPage + from wagtail.test.testapp.models import DefaultRichBlockFieldPage rich_text_block = ( DefaultRichBlockFieldPage.get_edit_handler() @@ -58,7 +58,7 @@ class TestGetRichTextEditorWidget(TestCase): @override_settings( WAGTAILADMIN_RICH_TEXT_EDITORS={ - "default": {"WIDGET": "wagtail.tests.testapp.rich_text.CustomRichTextArea"}, + "default": {"WIDGET": "wagtail.test.testapp.rich_text.CustomRichTextArea"}, } ) def test_overridden_default_editor(self): @@ -66,7 +66,7 @@ class TestGetRichTextEditorWidget(TestCase): @override_settings( WAGTAILADMIN_RICH_TEXT_EDITORS={ - "custom": {"WIDGET": "wagtail.tests.testapp.rich_text.CustomRichTextArea"}, + "custom": {"WIDGET": "wagtail.test.testapp.rich_text.CustomRichTextArea"}, } ) def test_custom_editor_without_default(self): @@ -75,8 +75,8 @@ class TestGetRichTextEditorWidget(TestCase): @override_settings( WAGTAILADMIN_RICH_TEXT_EDITORS={ - "default": {"WIDGET": "wagtail.tests.testapp.rich_text.LegacyRichTextArea"}, - "custom": {"WIDGET": "wagtail.tests.testapp.rich_text.CustomRichTextArea"}, + "default": {"WIDGET": "wagtail.test.testapp.rich_text.LegacyRichTextArea"}, + "custom": {"WIDGET": "wagtail.test.testapp.rich_text.CustomRichTextArea"}, } ) def test_custom_editor_with_default(self): @@ -196,7 +196,7 @@ class TestDraftailFeatureMedia(BaseRichTextEditHandlerTestCase, WagtailTestUtils @override_settings( WAGTAILADMIN_RICH_TEXT_EDITORS={ - "default": {"WIDGET": "wagtail.tests.testapp.rich_text.LegacyRichTextArea"}, + "default": {"WIDGET": "wagtail.test.testapp.rich_text.LegacyRichTextArea"}, } ) class TestOverriddenDefaultRichText(BaseRichTextEditHandlerTestCase, WagtailTestUtils): @@ -245,7 +245,7 @@ class TestOverriddenDefaultRichText(BaseRichTextEditHandlerTestCase, WagtailTest "default": { "WIDGET": "wagtail.admin.tests.test_rich_text.TestCustomDefaultRichText" }, - "custom": {"WIDGET": "wagtail.tests.testapp.rich_text.CustomRichTextArea"}, + "custom": {"WIDGET": "wagtail.test.testapp.rich_text.CustomRichTextArea"}, } ) class TestCustomDefaultRichText(BaseRichTextEditHandlerTestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_site_summary.py b/wagtail/admin/tests/test_site_summary.py index 67f3a4fc4d..d76c5b3913 100644 --- a/wagtail/admin/tests/test_site_summary.py +++ b/wagtail/admin/tests/test_site_summary.py @@ -4,8 +4,8 @@ from django.urls import reverse from wagtail.admin.site_summary import PagesSummaryItem from wagtail.core.models import GroupPagePermission, Page, Site -from wagtail.tests.testapp.models import SimplePage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import SimplePage +from wagtail.test.utils import WagtailTestUtils class TestPagesSummary(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_templatetags.py b/wagtail/admin/tests/test_templatetags.py index dbdc674147..e47b33d2e6 100644 --- a/wagtail/admin/tests/test_templatetags.py +++ b/wagtail/admin/tests/test_templatetags.py @@ -25,7 +25,7 @@ from wagtail.admin.templatetags.wagtailadmin_tags import ( from wagtail.admin.ui.components import Component from wagtail.core.models import Locale from wagtail.images.tests.utils import get_test_image_file -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from wagtail.users.models import UserProfile diff --git a/wagtail/admin/tests/test_userbar.py b/wagtail/admin/tests/test_userbar.py index 62484e6596..57980830b2 100644 --- a/wagtail/admin/tests/test_userbar.py +++ b/wagtail/admin/tests/test_userbar.py @@ -5,8 +5,8 @@ from django.test.client import RequestFactory from django.urls import reverse from wagtail.core.models import PAGE_TEMPLATE_VAR, Page -from wagtail.tests.testapp.models import BusinessChild, BusinessIndex -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import BusinessChild, BusinessIndex +from wagtail.test.utils import WagtailTestUtils class TestUserbarTag(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_views.py b/wagtail/admin/tests/test_views.py index cdf9f82e11..526d6c254c 100644 --- a/wagtail/admin/tests/test_views.py +++ b/wagtail/admin/tests/test_views.py @@ -2,7 +2,7 @@ from django.test import TestCase, override_settings from django.urls import reverse from wagtail.core.models import Page -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestLoginView(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/test_widgets.py b/wagtail/admin/tests/test_widgets.py index ab08454126..ceb6b5491c 100644 --- a/wagtail/admin/tests/test_widgets.py +++ b/wagtail/admin/tests/test_widgets.py @@ -7,8 +7,8 @@ from django.test.utils import override_settings from wagtail.admin import widgets from wagtail.admin.forms.tags import TagField from wagtail.core.models import Page -from wagtail.tests.testapp.forms import AdminStarDateInput -from wagtail.tests.testapp.models import EventPage, RestaurantTag, SimplePage +from wagtail.test.testapp.forms import AdminStarDateInput +from wagtail.test.testapp.models import EventPage, RestaurantTag, SimplePage class TestAdminPageChooserWidget(TestCase): diff --git a/wagtail/admin/tests/test_workflows.py b/wagtail/admin/tests/test_workflows.py index 27ce4b262c..d25ef2ce5c 100644 --- a/wagtail/admin/tests/test_workflows.py +++ b/wagtail/admin/tests/test_workflows.py @@ -22,8 +22,8 @@ from wagtail.core.models import ( WorkflowTask, ) from wagtail.core.signals import page_published -from wagtail.tests.testapp.models import SimplePage, SimpleTask -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import SimplePage, SimpleTask +from wagtail.test.utils import WagtailTestUtils from wagtail.users.models import UserProfile diff --git a/wagtail/admin/tests/tests.py b/wagtail/admin/tests/tests.py index fd89a233d5..6121ad7a3a 100644 --- a/wagtail/admin/tests/tests.py +++ b/wagtail/admin/tests/tests.py @@ -17,8 +17,8 @@ from wagtail.admin.auth import user_has_any_page_permission from wagtail.admin.mail import send_mail from wagtail.admin.menu import MenuItem from wagtail.core.models import Page -from wagtail.tests.testapp.models import RestaurantTag -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import RestaurantTag +from wagtail.test.utils import WagtailTestUtils class TestHome(TestCase, WagtailTestUtils): diff --git a/wagtail/admin/tests/ui/test_sidebar.py b/wagtail/admin/tests/ui/test_sidebar.py index 3da7b5049c..1222368b7d 100644 --- a/wagtail/admin/tests/ui/test_sidebar.py +++ b/wagtail/admin/tests/ui/test_sidebar.py @@ -13,7 +13,7 @@ from wagtail.admin.ui.sidebar import ( WagtailBrandingModule, ) from wagtail.core.telepath import JSContext -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestAdaptLinkMenuItem(TestCase): diff --git a/wagtail/api/v2/tests/test_pages.py b/wagtail/api/v2/tests/test_pages.py index 8e1c7430eb..52e7361352 100644 --- a/wagtail/api/v2/tests/test_pages.py +++ b/wagtail/api/v2/tests/test_pages.py @@ -12,9 +12,9 @@ from rest_framework.test import APIClient from wagtail.api.v2 import signal_handlers from wagtail.core.models import Locale, Page, Site from wagtail.core.models.view_restrictions import BaseViewRestriction -from wagtail.tests.demosite import models -from wagtail.tests.testapp.models import StreamPage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.demosite import models +from wagtail.test.testapp.models import StreamPage +from wagtail.test.utils import WagtailTestUtils def get_total_page_count(): diff --git a/wagtail/contrib/forms/tests/test_forms.py b/wagtail/contrib/forms/tests/test_forms.py index 6a2c365126..0eab040395 100644 --- a/wagtail/contrib/forms/tests/test_forms.py +++ b/wagtail/contrib/forms/tests/test_forms.py @@ -5,7 +5,7 @@ from django.test import TestCase from wagtail.contrib.forms.forms import FormBuilder from wagtail.contrib.forms.utils import get_field_clean_name from wagtail.core.models import Page -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( ExtendedFormField, FormField, FormPage, diff --git a/wagtail/contrib/forms/tests/test_models.py b/wagtail/contrib/forms/tests/test_models.py index 2829a63caf..9853206dc8 100644 --- a/wagtail/contrib/forms/tests/test_models.py +++ b/wagtail/contrib/forms/tests/test_models.py @@ -15,7 +15,7 @@ from wagtail.contrib.forms.tests.utils import ( make_types_test_form_page, ) from wagtail.core.models import Page -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( CustomFormPageSubmission, ExtendedFormField, FormField, @@ -23,7 +23,7 @@ from wagtail.tests.testapp.models import ( FormPageWithCustomFormBuilder, JadeFormPage, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestFormSubmission(TestCase): diff --git a/wagtail/contrib/forms/tests/test_views.py b/wagtail/contrib/forms/tests/test_views.py index f0729259c7..df35122fcf 100644 --- a/wagtail/contrib/forms/tests/test_views.py +++ b/wagtail/contrib/forms/tests/test_views.py @@ -19,7 +19,7 @@ from wagtail.contrib.forms.tests.utils import ( make_form_page_with_custom_submission, ) from wagtail.core.models import Locale, Page -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( CustomFormPageSubmission, ExtendedFormField, FormField, @@ -30,7 +30,7 @@ from wagtail.tests.testapp.models import ( FormPageWithCustomSubmission, FormPageWithCustomSubmissionListView, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestFormResponsesPanel(TestCase): diff --git a/wagtail/contrib/forms/tests/utils.py b/wagtail/contrib/forms/tests/utils.py index a0219202bd..bd5b229228 100644 --- a/wagtail/contrib/forms/tests/utils.py +++ b/wagtail/contrib/forms/tests/utils.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from wagtail.core.models import Page -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( FormField, FormFieldWithCustomSubmission, FormPage, diff --git a/wagtail/contrib/frontend_cache/tests.py b/wagtail/contrib/frontend_cache/tests.py index 679172bc1d..59c45ae62a 100644 --- a/wagtail/contrib/frontend_cache/tests.py +++ b/wagtail/contrib/frontend_cache/tests.py @@ -18,7 +18,7 @@ from wagtail.contrib.frontend_cache.backends import ( ) from wagtail.contrib.frontend_cache.utils import get_backends from wagtail.core.models import Page -from wagtail.tests.testapp.models import EventIndex +from wagtail.test.testapp.models import EventIndex from .utils import ( PurgeBatch, @@ -525,7 +525,7 @@ class TestCachePurgingSignals(TestCase): self.assertEqual(PURGED_URLS, []) @override_settings( - ROOT_URLCONF="wagtail.tests.urls_multilang", + ROOT_URLCONF="wagtail.test.urls_multilang", LANGUAGE_CODE="en", WAGTAILFRONTENDCACHE_LANGUAGES=["en", "fr", "pt-br"], ) @@ -547,7 +547,7 @@ class TestCachePurgingSignals(TestCase): ) @override_settings( - ROOT_URLCONF="wagtail.tests.urls_multilang", + ROOT_URLCONF="wagtail.test.urls_multilang", LANGUAGE_CODE="en", WAGTAIL_I18N_ENABLED=True, WAGTAIL_CONTENT_LANGUAGES=[("en", "English"), ("fr", "French")], @@ -568,7 +568,7 @@ class TestCachePurgingSignals(TestCase): ) @override_settings( - ROOT_URLCONF="wagtail.tests.urls_multilang", + ROOT_URLCONF="wagtail.test.urls_multilang", LANGUAGE_CODE="en", WAGTAIL_CONTENT_LANGUAGES=[("en", "English"), ("fr", "French")], ) diff --git a/wagtail/contrib/modeladmin/tests/test_modeladmin_edit_handlers.py b/wagtail/contrib/modeladmin/tests/test_modeladmin_edit_handlers.py index abb800f249..6482c5af47 100644 --- a/wagtail/contrib/modeladmin/tests/test_modeladmin_edit_handlers.py +++ b/wagtail/contrib/modeladmin/tests/test_modeladmin_edit_handlers.py @@ -4,9 +4,9 @@ from django.test import RequestFactory, TestCase from wagtail.admin.edit_handlers import FieldPanel, ObjectList, TabbedInterface from wagtail.contrib.modeladmin.views import CreateView -from wagtail.tests.modeladmintest.models import Person -from wagtail.tests.modeladmintest.wagtail_hooks import PersonAdmin -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.modeladmintest.models import Person +from wagtail.test.modeladmintest.wagtail_hooks import PersonAdmin +from wagtail.test.utils import WagtailTestUtils class TestExtractPanelDefinitionsFromModelAdmin(TestCase, WagtailTestUtils): diff --git a/wagtail/contrib/modeladmin/tests/test_page_modeladmin.py b/wagtail/contrib/modeladmin/tests/test_page_modeladmin.py index 2d0acd1117..0c0fcc5664 100644 --- a/wagtail/contrib/modeladmin/tests/test_page_modeladmin.py +++ b/wagtail/contrib/modeladmin/tests/test_page_modeladmin.py @@ -2,8 +2,8 @@ from django.contrib.auth.models import Group, Permission from django.test import TestCase from wagtail.core.models import GroupPagePermission, Page -from wagtail.tests.testapp.models import BusinessIndex, EventCategory, EventPage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import BusinessIndex, EventCategory, EventPage +from wagtail.test.utils import WagtailTestUtils class TestIndexView(TestCase, WagtailTestUtils): diff --git a/wagtail/contrib/modeladmin/tests/test_search_handlers.py b/wagtail/contrib/modeladmin/tests/test_search_handlers.py index dbb339180f..9dee965f00 100644 --- a/wagtail/contrib/modeladmin/tests/test_search_handlers.py +++ b/wagtail/contrib/modeladmin/tests/test_search_handlers.py @@ -6,7 +6,7 @@ from wagtail.contrib.modeladmin.helpers import ( DjangoORMSearchHandler, WagtailBackendSearchHandler, ) -from wagtail.tests.modeladmintest.models import Book +from wagtail.test.modeladmintest.models import Book class FakeSearchBackend: diff --git a/wagtail/contrib/modeladmin/tests/test_simple_modeladmin.py b/wagtail/contrib/modeladmin/tests/test_simple_modeladmin.py index 3c07e56d84..1653eab004 100644 --- a/wagtail/contrib/modeladmin/tests/test_simple_modeladmin.py +++ b/wagtail/contrib/modeladmin/tests/test_simple_modeladmin.py @@ -15,15 +15,15 @@ from wagtail.contrib.modeladmin.helpers.search import DjangoORMSearchHandler from wagtail.core.models import ModelLogEntry, Page from wagtail.images.models import Image from wagtail.images.tests.utils import get_test_image_file -from wagtail.tests.modeladmintest.models import ( +from wagtail.test.modeladmintest.models import ( Author, Book, Publisher, RelatedLink, Token, ) -from wagtail.tests.modeladmintest.wagtail_hooks import BookModelAdmin -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.modeladmintest.wagtail_hooks import BookModelAdmin +from wagtail.test.utils import WagtailTestUtils class TestBookIndexView(TestCase, WagtailTestUtils): @@ -338,7 +338,7 @@ class TestCreateView(TestCase, WagtailTestUtils): def test_clean_form_once(self): with mock.patch( - "wagtail.tests.modeladmintest.wagtail_hooks.PublisherModelAdminForm.clean" + "wagtail.test.modeladmintest.wagtail_hooks.PublisherModelAdminForm.clean" ) as mock_form_clean: response = self.client.post( "/admin/modeladmintest/publisher/create/", {"name": ""} @@ -540,7 +540,7 @@ class TestEditView(TestCase, WagtailTestUtils): def test_clean_form_once(self): with mock.patch( - "wagtail.tests.modeladmintest.wagtail_hooks.PublisherModelAdminForm.clean" + "wagtail.test.modeladmintest.wagtail_hooks.PublisherModelAdminForm.clean" ) as mock_form_clean: publisher = Publisher.objects.create(name="Sharper Collins") diff --git a/wagtail/contrib/redirects/tests/test_import_admin_views.py b/wagtail/contrib/redirects/tests/test_import_admin_views.py index 9ae08ea22e..c6e987af1b 100644 --- a/wagtail/contrib/redirects/tests/test_import_admin_views.py +++ b/wagtail/contrib/redirects/tests/test_import_admin_views.py @@ -6,7 +6,7 @@ from django.urls import reverse from wagtail.contrib.redirects.models import Redirect from wagtail.core.models import Site -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils TEST_ROOT = os.path.abspath(os.path.dirname(__file__)) diff --git a/wagtail/contrib/redirects/tests/test_redirects.py b/wagtail/contrib/redirects/tests/test_redirects.py index 3b33e0ac3b..1586e63df9 100644 --- a/wagtail/contrib/redirects/tests/test_redirects.py +++ b/wagtail/contrib/redirects/tests/test_redirects.py @@ -5,8 +5,8 @@ from django.urls import reverse from wagtail.admin.admin_url_finder import AdminURLFinder from wagtail.contrib.redirects import models from wagtail.core.models import Page, Site -from wagtail.tests.routablepage.models import RoutablePageTest -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.routablepage.models import RoutablePageTest +from wagtail.test.utils import WagtailTestUtils @override_settings( diff --git a/wagtail/contrib/redirects/tests/test_reports_view.py b/wagtail/contrib/redirects/tests/test_reports_view.py index f3f62f698f..851deb605c 100644 --- a/wagtail/contrib/redirects/tests/test_reports_view.py +++ b/wagtail/contrib/redirects/tests/test_reports_view.py @@ -6,7 +6,7 @@ from openpyxl import load_workbook from wagtail.contrib.redirects.models import Redirect from wagtail.core.models import Site -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestRedirectReport(TestCase, WagtailTestUtils): diff --git a/wagtail/contrib/redirects/tests/test_signal_handlers.py b/wagtail/contrib/redirects/tests/test_signal_handlers.py index dba9199c15..3ec6d54130 100644 --- a/wagtail/contrib/redirects/tests/test_signal_handlers.py +++ b/wagtail/contrib/redirects/tests/test_signal_handlers.py @@ -5,9 +5,9 @@ from django.test import TestCase, override_settings from wagtail.contrib.redirects.models import Redirect from wagtail.core.coreutils import get_dummy_request from wagtail.core.models import Page, Site -from wagtail.tests.routablepage.models import RoutablePageTest -from wagtail.tests.testapp.models import EventIndex -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.routablepage.models import RoutablePageTest +from wagtail.test.testapp.models import EventIndex +from wagtail.test.utils import WagtailTestUtils User = get_user_model() diff --git a/wagtail/contrib/routable_page/tests.py b/wagtail/contrib/routable_page/tests.py index c2bd21ad36..aac860165b 100644 --- a/wagtail/contrib/routable_page/tests.py +++ b/wagtail/contrib/routable_page/tests.py @@ -8,7 +8,7 @@ from wagtail.contrib.routable_page.templatetags.wagtailroutablepage_tags import routablepageurl, ) from wagtail.core.models import Page, Site -from wagtail.tests.routablepage.models import ( +from wagtail.test.routablepage.models import ( RoutablePageTest, RoutablePageWithOverriddenIndexRouteTest, ) diff --git a/wagtail/contrib/search_promotions/tests.py b/wagtail/contrib/search_promotions/tests.py index 31f5396967..465197f54d 100644 --- a/wagtail/contrib/search_promotions/tests.py +++ b/wagtail/contrib/search_promotions/tests.py @@ -7,7 +7,7 @@ from wagtail.contrib.search_promotions.templatetags.wagtailsearchpromotions_tags get_search_promotions, ) from wagtail.search.models import Query -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestSearchPromotions(TestCase): diff --git a/wagtail/contrib/settings/tests/base.py b/wagtail/contrib/settings/tests/base.py index e8eab475cc..9cdb851d98 100644 --- a/wagtail/contrib/settings/tests/base.py +++ b/wagtail/contrib/settings/tests/base.py @@ -1,7 +1,7 @@ from django.http import HttpRequest from wagtail.core.models import Page, Site -from wagtail.tests.testapp.models import TestSetting +from wagtail.test.testapp.models import TestSetting class SettingsTestMixin: diff --git a/wagtail/contrib/settings/tests/test_admin.py b/wagtail/contrib/settings/tests/test_admin.py index bd1ffd8ed5..f60b51e433 100644 --- a/wagtail/contrib/settings/tests/test_admin.py +++ b/wagtail/contrib/settings/tests/test_admin.py @@ -9,14 +9,14 @@ from wagtail.contrib.settings.registry import SettingMenuItem from wagtail.contrib.settings.views import get_setting_edit_handler from wagtail.core import hooks from wagtail.core.models import Page, Site -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( FileUploadSetting, IconSetting, PanelSettings, TabbedSettings, TestSetting, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestSettingMenu(TestCase, WagtailTestUtils): diff --git a/wagtail/contrib/settings/tests/test_forms.py b/wagtail/contrib/settings/tests/test_forms.py index bef24d8578..3a2e40824f 100644 --- a/wagtail/contrib/settings/tests/test_forms.py +++ b/wagtail/contrib/settings/tests/test_forms.py @@ -2,7 +2,7 @@ from django.test import TestCase from wagtail.contrib.settings.forms import SiteSwitchForm from wagtail.core.models import Page, Site -from wagtail.tests.testapp.models import TestSetting +from wagtail.test.testapp.models import TestSetting class TestSiteSwitchFromSiteOrdering(TestCase): diff --git a/wagtail/contrib/settings/tests/test_model.py b/wagtail/contrib/settings/tests/test_model.py index 4a8e9f2893..f6f202435f 100644 --- a/wagtail/contrib/settings/tests/test_model.py +++ b/wagtail/contrib/settings/tests/test_model.py @@ -1,7 +1,7 @@ from django.test import TestCase, override_settings from wagtail.core.models import Site -from wagtail.tests.testapp.models import ImportantPages, TestSetting +from wagtail.test.testapp.models import ImportantPages, TestSetting from .base import SettingsTestMixin diff --git a/wagtail/contrib/settings/tests/test_register.py b/wagtail/contrib/settings/tests/test_register.py index d527ded7c0..f88a05fb37 100644 --- a/wagtail/contrib/settings/tests/test_register.py +++ b/wagtail/contrib/settings/tests/test_register.py @@ -2,8 +2,8 @@ from django.test import TestCase from django.urls import reverse from wagtail.contrib.settings.registry import Registry -from wagtail.tests.testapp.models import NotYetRegisteredSetting -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import NotYetRegisteredSetting +from wagtail.test.utils import WagtailTestUtils class TestRegister(TestCase, WagtailTestUtils): diff --git a/wagtail/contrib/settings/tests/test_templates.py b/wagtail/contrib/settings/tests/test_templates.py index 00529eefe4..ed75662cd2 100644 --- a/wagtail/contrib/settings/tests/test_templates.py +++ b/wagtail/contrib/settings/tests/test_templates.py @@ -4,7 +4,7 @@ from django.test import TestCase from django.test.utils import override_settings from wagtail.core.models import Site -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from .base import SettingsTestMixin diff --git a/wagtail/contrib/simple_translation/tests/test_forms.py b/wagtail/contrib/simple_translation/tests/test_forms.py index 9e362a9c7a..51fa871307 100644 --- a/wagtail/contrib/simple_translation/tests/test_forms.py +++ b/wagtail/contrib/simple_translation/tests/test_forms.py @@ -3,8 +3,8 @@ from django.test import TestCase, override_settings from wagtail.contrib.simple_translation.forms import SubmitTranslationForm from wagtail.core.models import Locale, Page -from wagtail.tests.i18n.models import TestPage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.i18n.models import TestPage +from wagtail.test.utils import WagtailTestUtils @override_settings( diff --git a/wagtail/contrib/simple_translation/tests/test_migrations.py b/wagtail/contrib/simple_translation/tests/test_migrations.py index 124cf0eb23..9e2c88c66f 100644 --- a/wagtail/contrib/simple_translation/tests/test_migrations.py +++ b/wagtail/contrib/simple_translation/tests/test_migrations.py @@ -1,7 +1,7 @@ from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType -from wagtail.tests.utils import TestCase +from wagtail.test.utils import TestCase class TestMigrations(TestCase): diff --git a/wagtail/contrib/simple_translation/tests/test_views.py b/wagtail/contrib/simple_translation/tests/test_views.py index 0ba34530de..4204177a5d 100644 --- a/wagtail/contrib/simple_translation/tests/test_views.py +++ b/wagtail/contrib/simple_translation/tests/test_views.py @@ -15,9 +15,9 @@ from wagtail.contrib.simple_translation.views import ( from wagtail.core import hooks from wagtail.core.actions.copy_for_translation import ParentNotTranslatedError from wagtail.core.models import Locale, Page -from wagtail.tests.i18n.models import TestPage -from wagtail.tests.snippets.models import TranslatableSnippet -from wagtail.tests.utils import TestCase, WagtailTestUtils +from wagtail.test.i18n.models import TestPage +from wagtail.test.snippets.models import TranslatableSnippet +from wagtail.test.utils import TestCase, WagtailTestUtils @override_settings( diff --git a/wagtail/contrib/simple_translation/tests/test_wagtail_hooks.py b/wagtail/contrib/simple_translation/tests/test_wagtail_hooks.py index dc21064ab8..bc27d6296b 100644 --- a/wagtail/contrib/simple_translation/tests/test_wagtail_hooks.py +++ b/wagtail/contrib/simple_translation/tests/test_wagtail_hooks.py @@ -9,8 +9,8 @@ from wagtail.contrib.simple_translation.wagtail_hooks import ( register_submit_translation_permission, ) from wagtail.core.models import Locale, Page -from wagtail.tests.i18n.models import TestPage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.i18n.models import TestPage +from wagtail.test.utils import WagtailTestUtils class Utils(WagtailTestUtils, TestCase): diff --git a/wagtail/contrib/sitemaps/tests.py b/wagtail/contrib/sitemaps/tests.py index 7958d02a6b..a6a05c8d10 100644 --- a/wagtail/contrib/sitemaps/tests.py +++ b/wagtail/contrib/sitemaps/tests.py @@ -8,7 +8,7 @@ from django.test import RequestFactory, TestCase, override_settings from django.utils import timezone from wagtail.core.models import Page, PageViewRestriction, Site -from wagtail.tests.testapp.models import EventIndex, SimplePage +from wagtail.test.testapp.models import EventIndex, SimplePage from .sitemap_generator import Sitemap diff --git a/wagtail/contrib/styleguide/tests.py b/wagtail/contrib/styleguide/tests.py index 61e46171cf..2cace1babb 100644 --- a/wagtail/contrib/styleguide/tests.py +++ b/wagtail/contrib/styleguide/tests.py @@ -1,7 +1,7 @@ from django.test import TestCase from django.urls import reverse -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestStyleGuide(TestCase, WagtailTestUtils): diff --git a/wagtail/contrib/table_block/tests.py b/wagtail/contrib/table_block/tests.py index 3bd076c9da..16bfacb020 100644 --- a/wagtail/contrib/table_block/tests.py +++ b/wagtail/contrib/table_block/tests.py @@ -8,8 +8,8 @@ from django.utils import translation from wagtail.contrib.table_block.blocks import DEFAULT_TABLE_OPTIONS, TableBlock from wagtail.core.blocks.field_block import FieldBlockAdapter from wagtail.core.models import Page -from wagtail.tests.testapp.models import TableBlockStreamPage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import TableBlockStreamPage +from wagtail.test.utils import WagtailTestUtils from .blocks import TableInput diff --git a/wagtail/core/tests/test_audit_log.py b/wagtail/core/tests/test_audit_log.py index 00e8b32de4..abc92284e5 100644 --- a/wagtail/core/tests/test_audit_log.py +++ b/wagtail/core/tests/test_audit_log.py @@ -16,8 +16,8 @@ from wagtail.core.models import ( Workflow, WorkflowTask, ) -from wagtail.tests.testapp.models import SimplePage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import SimplePage +from wagtail.test.utils import WagtailTestUtils class TestAuditLogManager(TestCase, WagtailTestUtils): diff --git a/wagtail/core/tests/test_blocks.py b/wagtail/core/tests/test_blocks.py index 8a5c6f84bf..3970b49590 100644 --- a/wagtail/core/tests/test_blocks.py +++ b/wagtail/core/tests/test_blocks.py @@ -22,10 +22,10 @@ from wagtail.core.blocks.stream_block import StreamBlockAdapter from wagtail.core.blocks.struct_block import StructBlockAdapter from wagtail.core.models import Page from wagtail.core.rich_text import RichText -from wagtail.tests.testapp.blocks import LinkBlock as CustomLinkBlock -from wagtail.tests.testapp.blocks import SectionBlock -from wagtail.tests.testapp.models import EventPage, SimplePage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.blocks import LinkBlock as CustomLinkBlock +from wagtail.test.testapp.blocks import SectionBlock +from wagtail.test.testapp.models import EventPage, SimplePage +from wagtail.test.utils import WagtailTestUtils class FooStreamBlock(blocks.StreamBlock): @@ -546,7 +546,7 @@ class TestRichTextBlock(TestCase): ) def test_adapter(self): - from wagtail.tests.testapp.rich_text import CustomRichTextArea + from wagtail.test.testapp.rich_text import CustomRichTextArea block = blocks.RichTextBlock(editor="custom") diff --git a/wagtail/core/tests/test_collection_permission_policies.py b/wagtail/core/tests/test_collection_permission_policies.py index a1fd01092e..905c1fbc59 100644 --- a/wagtail/core/tests/test_collection_permission_policies.py +++ b/wagtail/core/tests/test_collection_permission_policies.py @@ -10,7 +10,7 @@ from wagtail.core.permission_policies.collections import ( ) from wagtail.core.tests.test_permission_policies import PermissionPolicyTestUtils from wagtail.documents.models import Document -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class PermissionPolicyTestCase(PermissionPolicyTestUtils, TestCase, WagtailTestUtils): diff --git a/wagtail/core/tests/test_hooks.py b/wagtail/core/tests/test_hooks.py index dd4fcd9af6..bd9a926861 100644 --- a/wagtail/core/tests/test_hooks.py +++ b/wagtail/core/tests/test_hooks.py @@ -1,7 +1,7 @@ from django.test import TestCase from wagtail.core import hooks -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils def test_hook(): diff --git a/wagtail/core/tests/test_jinja2.py b/wagtail/core/tests/test_jinja2.py index c5b6ea148d..6f70d674d6 100644 --- a/wagtail/core/tests/test_jinja2.py +++ b/wagtail/core/tests/test_jinja2.py @@ -7,7 +7,7 @@ from django.utils.safestring import mark_safe from wagtail import __version__ from wagtail.core import blocks from wagtail.core.models import Page, Site -from wagtail.tests.testapp.blocks import SectionBlock +from wagtail.test.testapp.blocks import SectionBlock class TestCoreGlobalsAndFilters(TestCase): diff --git a/wagtail/core/tests/test_locale_model.py b/wagtail/core/tests/test_locale_model.py index d6cf14a548..00b1cf0b76 100644 --- a/wagtail/core/tests/test_locale_model.py +++ b/wagtail/core/tests/test_locale_model.py @@ -4,7 +4,7 @@ from django.utils import translation from django.utils.translation import gettext_lazy as _ from wagtail.core.models import Locale, Page -from wagtail.tests.i18n.models import TestPage +from wagtail.test.i18n.models import TestPage def make_test_page(**kwargs): diff --git a/wagtail/core/tests/test_management_commands.py b/wagtail/core/tests/test_management_commands.py index d636921ca7..c84dd37cbb 100644 --- a/wagtail/core/tests/test_management_commands.py +++ b/wagtail/core/tests/test_management_commands.py @@ -10,7 +10,7 @@ from django.utils import timezone from wagtail.core.models import Collection, Page, PageLogEntry, PageRevision from wagtail.core.signals import page_published, page_unpublished -from wagtail.tests.testapp.models import EventPage, SecretPage, SimplePage +from wagtail.test.testapp.models import EventPage, SecretPage, SimplePage class TestFixTreeCommand(TestCase): diff --git a/wagtail/core/tests/test_page_model.py b/wagtail/core/tests/test_page_model.py index 0a9d2fc7ae..b323d11ea3 100644 --- a/wagtail/core/tests/test_page_model.py +++ b/wagtail/core/tests/test_page_model.py @@ -27,7 +27,7 @@ from wagtail.core.models import ( get_translatable_models, ) from wagtail.core.signals import page_published -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( AbstractPage, Advert, AlwaysShowInMenusPage, @@ -61,7 +61,7 @@ from wagtail.tests.testapp.models import ( TaggedGrandchildPage, TaggedPage, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils def get_ct(model): @@ -408,7 +408,7 @@ class TestRouting(TestCase): (second_events_site.id, "http://second-events.example.com", "/christmas/"), ) - @override_settings(ROOT_URLCONF="wagtail.tests.non_root_urls") + @override_settings(ROOT_URLCONF="wagtail.test.non_root_urls") def test_urls_with_non_root_urlconf(self): default_site = Site.objects.get(is_default_site=True) homepage = Page.objects.get(url_path="/home/") @@ -436,7 +436,7 @@ class TestRouting(TestCase): ) self.assertEqual(christmas_page.get_site(), default_site) - @override_settings(ROOT_URLCONF="wagtail.tests.headless_urls") + @override_settings(ROOT_URLCONF="wagtail.test.headless_urls") def test_urls_headless(self): default_site = Site.objects.get(is_default_site=True) homepage = Page.objects.get(url_path="/home/") @@ -523,7 +523,7 @@ class TestRouting(TestCase): @override_settings( - ROOT_URLCONF="wagtail.tests.urls_multilang", + ROOT_URLCONF="wagtail.test.urls_multilang", LANGUAGE_CODE="en", WAGTAIL_I18N_ENABLED=True, LANGUAGES=[ @@ -788,7 +788,7 @@ class TestServeView(TestCase): self.assertContains(response, "

Christmas

") self.assertContains(response, "

Event

") - @override_settings(ROOT_URLCONF="wagtail.tests.non_root_urls") + @override_settings(ROOT_URLCONF="wagtail.test.non_root_urls") def test_serve_with_non_root_urls(self): response = self.client.get("/site/events/christmas/") diff --git a/wagtail/core/tests/test_page_permissions.py b/wagtail/core/tests/test_page_permissions.py index c1fe2b9204..98e574d894 100644 --- a/wagtail/core/tests/test_page_permissions.py +++ b/wagtail/core/tests/test_page_permissions.py @@ -14,7 +14,7 @@ from wagtail.core.models import ( Workflow, WorkflowTask, ) -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( BusinessSubIndex, EventIndex, EventPage, diff --git a/wagtail/core/tests/test_page_privacy.py b/wagtail/core/tests/test_page_privacy.py index 057a8b46ea..ef8da10cbd 100644 --- a/wagtail/core/tests/test_page_privacy.py +++ b/wagtail/core/tests/test_page_privacy.py @@ -2,7 +2,7 @@ from django.contrib.auth.models import Group from django.test import TestCase from wagtail.core.models import Page, PageViewRestriction -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestPagePrivacy(TestCase, WagtailTestUtils): diff --git a/wagtail/core/tests/test_page_queryset.py b/wagtail/core/tests/test_page_queryset.py index 21b1d140e1..a0be39bdf3 100644 --- a/wagtail/core/tests/test_page_queryset.py +++ b/wagtail/core/tests/test_page_queryset.py @@ -7,7 +7,7 @@ from django.test import TestCase from wagtail.core.models import Locale, Page, PageViewRestriction, Site from wagtail.core.signals import page_unpublished from wagtail.search.query import MATCH_ALL -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( EventPage, SimplePage, SingleEventPage, diff --git a/wagtail/core/tests/test_permission_policies.py b/wagtail/core/tests/test_permission_policies.py index 9d1a293a5d..64fc7ef028 100644 --- a/wagtail/core/tests/test_permission_policies.py +++ b/wagtail/core/tests/test_permission_policies.py @@ -10,7 +10,7 @@ from wagtail.core.permission_policies import ( ) from wagtail.images.models import Image from wagtail.images.tests.utils import get_test_image_file -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class PermissionPolicyTestUtils: diff --git a/wagtail/core/tests/test_rich_text.py b/wagtail/core/tests/test_rich_text.py index ae7571a1fa..78be50d025 100644 --- a/wagtail/core/tests/test_rich_text.py +++ b/wagtail/core/tests/test_rich_text.py @@ -8,7 +8,7 @@ from wagtail.core.rich_text import RichText, expand_db_html from wagtail.core.rich_text.feature_registry import FeatureRegistry from wagtail.core.rich_text.pages import PageLinkHandler from wagtail.core.rich_text.rewriters import LinkRewriter, extract_attrs -from wagtail.tests.testapp.models import EventPage +from wagtail.test.testapp.models import EventPage class TestPageLinktypeHandler(TestCase): @@ -35,7 +35,7 @@ class TestPageLinktypeHandler(TestCase): ("en", "English"), ("fr", "French"), ], - ROOT_URLCONF="wagtail.tests.urls_multilang", + ROOT_URLCONF="wagtail.test.urls_multilang", ) class TestPageLinktypeHandlerWithI18N(TestCase): fixtures = ["test.json"] diff --git a/wagtail/core/tests/test_signals.py b/wagtail/core/tests/test_signals.py index 58c713433d..5b1caf0949 100644 --- a/wagtail/core/tests/test_signals.py +++ b/wagtail/core/tests/test_signals.py @@ -5,8 +5,8 @@ from django.test import TestCase from wagtail.core.models import Site from wagtail.core.signals import page_slug_changed -from wagtail.tests.testapp.models import SimplePage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import SimplePage +from wagtail.test.utils import WagtailTestUtils class TestPageSlugChangedSignal(TestCase, WagtailTestUtils): diff --git a/wagtail/core/tests/test_streamfield.py b/wagtail/core/tests/test_streamfield.py index caa53c1dd5..fe369714b9 100644 --- a/wagtail/core/tests/test_streamfield.py +++ b/wagtail/core/tests/test_streamfield.py @@ -13,7 +13,7 @@ from wagtail.core.fields import StreamField from wagtail.core.rich_text import RichText from wagtail.images.models import Image from wagtail.images.tests.utils import get_test_image_file -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( BlockCountsStreamModel, MinMaxCountStreamModel, StreamModel, diff --git a/wagtail/core/tests/test_tests.py b/wagtail/core/tests/test_tests.py index fcb94f634a..6e80274afa 100644 --- a/wagtail/core/tests/test_tests.py +++ b/wagtail/core/tests/test_tests.py @@ -4,7 +4,7 @@ from django.test import TestCase from wagtail.admin.tests.test_contentstate import content_state_equal from wagtail.core.models import PAGE_MODEL_CLASSES, Page, Site -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( BusinessChild, BusinessIndex, BusinessNowherePage, @@ -15,8 +15,8 @@ from wagtail.tests.testapp.models import ( SimplePage, StreamPage, ) -from wagtail.tests.utils import WagtailPageTests, WagtailTestUtils -from wagtail.tests.utils.form_data import ( +from wagtail.test.utils import WagtailPageTests, WagtailTestUtils +from wagtail.test.utils.form_data import ( inline_formset, nested_form_data, rich_text, @@ -171,7 +171,7 @@ class TestWagtailPageTests(WagtailPageTests): ) def test_assert_can_create_with_form_helpers(self): - # same as test_assert_can_create, but using the helpers from wagtail.tests.utils.form_data + # same as test_assert_can_create, but using the helpers from wagtail.test.utils.form_data # as an end-to-end test self.assertFalse(EventIndex.objects.exists()) self.assertCanCreate( diff --git a/wagtail/core/tests/test_translatablemixin.py b/wagtail/core/tests/test_translatablemixin.py index ed967a8845..98443b8d19 100644 --- a/wagtail/core/tests/test_translatablemixin.py +++ b/wagtail/core/tests/test_translatablemixin.py @@ -5,7 +5,7 @@ from django.core import checks from django.test import TestCase from wagtail.core.models import Locale -from wagtail.tests.i18n.models import ( +from wagtail.test.i18n.models import ( ClusterableTestModel, ClusterableTestModelChild, ClusterableTestModelTranslatableChild, diff --git a/wagtail/core/tests/test_views.py b/wagtail/core/tests/test_views.py index a5a0f9ecd2..4fc7c1dac3 100644 --- a/wagtail/core/tests/test_views.py +++ b/wagtail/core/tests/test_views.py @@ -2,7 +2,7 @@ from django.test import TestCase from django.urls import reverse from wagtail.core.models import Page -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestLoginView(TestCase, WagtailTestUtils): diff --git a/wagtail/core/tests/test_workflow.py b/wagtail/core/tests/test_workflow.py index 1387604656..2d9e6380c4 100644 --- a/wagtail/core/tests/test_workflow.py +++ b/wagtail/core/tests/test_workflow.py @@ -19,7 +19,7 @@ from wagtail.core.models import ( WorkflowState, WorkflowTask, ) -from wagtail.tests.testapp.models import SimplePage +from wagtail.test.testapp.models import SimplePage class TestWorkflows(TestCase): diff --git a/wagtail/core/tests/tests.py b/wagtail/core/tests/tests.py index dc62a45504..af9120f9a1 100644 --- a/wagtail/core/tests/tests.py +++ b/wagtail/core/tests/tests.py @@ -9,7 +9,7 @@ from django.utils.safestring import SafeString from wagtail.core.coreutils import resolve_model_string from wagtail.core.models import Locale, Page, Site, SiteRootPath from wagtail.core.templatetags.wagtailcore_tags import richtext, slugurl -from wagtail.tests.testapp.models import SimplePage +from wagtail.test.testapp.models import SimplePage class TestPageUrlTags(TestCase): diff --git a/wagtail/documents/tests/test_admin_views.py b/wagtail/documents/tests/test_admin_views.py index 37c91aa3a4..653e342e11 100644 --- a/wagtail/documents/tests/test_admin_views.py +++ b/wagtail/documents/tests/test_admin_views.py @@ -13,13 +13,13 @@ from wagtail.admin.admin_url_finder import AdminURLFinder from wagtail.core.models import Collection, GroupCollectionPermission, Page from wagtail.documents import get_document_model, models from wagtail.documents.tests.utils import get_test_document_file -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( CustomDocument, CustomDocumentWithAuthor, EventPage, EventPageRelatedLink, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestDocumentIndexView(TestCase, WagtailTestUtils): diff --git a/wagtail/documents/tests/test_bulk_actions/test_bulk_add_tags.py b/wagtail/documents/tests/test_bulk_actions/test_bulk_add_tags.py index 5bf8a8af2a..a95ea13f21 100644 --- a/wagtail/documents/tests/test_bulk_actions/test_bulk_add_tags.py +++ b/wagtail/documents/tests/test_bulk_actions/test_bulk_add_tags.py @@ -3,7 +3,7 @@ from django.test import TestCase from django.urls import reverse from wagtail.documents import get_document_model -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils Document = get_document_model() diff --git a/wagtail/documents/tests/test_bulk_actions/test_bulk_add_to_collection.py b/wagtail/documents/tests/test_bulk_actions/test_bulk_add_to_collection.py index 8e96676551..d829fda818 100644 --- a/wagtail/documents/tests/test_bulk_actions/test_bulk_add_to_collection.py +++ b/wagtail/documents/tests/test_bulk_actions/test_bulk_add_to_collection.py @@ -4,7 +4,7 @@ from django.urls import reverse from wagtail.core.models import Collection from wagtail.documents import get_document_model -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils Document = get_document_model() diff --git a/wagtail/documents/tests/test_bulk_actions/test_bulk_delete.py b/wagtail/documents/tests/test_bulk_actions/test_bulk_delete.py index 4e132827ee..c7dd65bed1 100644 --- a/wagtail/documents/tests/test_bulk_actions/test_bulk_delete.py +++ b/wagtail/documents/tests/test_bulk_actions/test_bulk_delete.py @@ -4,7 +4,7 @@ from django.test.utils import override_settings from django.urls import reverse from wagtail.documents import get_document_model -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils Document = get_document_model() diff --git a/wagtail/documents/tests/test_collection_privacy.py b/wagtail/documents/tests/test_collection_privacy.py index dfc6b6edc9..f058b06ab6 100644 --- a/wagtail/documents/tests/test_collection_privacy.py +++ b/wagtail/documents/tests/test_collection_privacy.py @@ -5,7 +5,7 @@ from django.urls import reverse from wagtail.core.models import Collection, CollectionViewRestriction from wagtail.documents.models import Document -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils try: from urllib.parse import quote diff --git a/wagtail/documents/tests/test_document_chooser.py b/wagtail/documents/tests/test_document_chooser.py index 9e6767b26b..5c531d9e24 100644 --- a/wagtail/documents/tests/test_document_chooser.py +++ b/wagtail/documents/tests/test_document_chooser.py @@ -9,7 +9,7 @@ from wagtail.core.models import ( get_root_collection_id, ) from wagtail.documents.models import Document -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestChooser(TestCase, WagtailTestUtils): diff --git a/wagtail/documents/tests/test_form_overrides.py b/wagtail/documents/tests/test_form_overrides.py index 3cc33ee2cc..c9026d7272 100644 --- a/wagtail/documents/tests/test_form_overrides.py +++ b/wagtail/documents/tests/test_form_overrides.py @@ -10,7 +10,7 @@ from wagtail.documents.forms import ( get_document_form, get_document_multi_form, ) -from wagtail.tests.testapp.media_forms import AlternateDocumentForm, OverriddenWidget +from wagtail.test.testapp.media_forms import AlternateDocumentForm, OverriddenWidget class TestDocumentFormOverride(TestCase): @@ -29,13 +29,13 @@ class TestDocumentFormOverride(TestCase): self.assertIsInstance(form.fields["file"].widget, forms.FileInput) @override_settings( - WAGTAILDOCS_DOCUMENT_FORM_BASE="wagtail.tests.testapp.media_forms.AlternateDocumentForm" + WAGTAILDOCS_DOCUMENT_FORM_BASE="wagtail.test.testapp.media_forms.AlternateDocumentForm" ) def test_overridden_base_form(self): self.assertIs(get_document_base_form(), AlternateDocumentForm) @override_settings( - WAGTAILDOCS_DOCUMENT_FORM_BASE="wagtail.tests.testapp.media_forms.AlternateDocumentForm" + WAGTAILDOCS_DOCUMENT_FORM_BASE="wagtail.test.testapp.media_forms.AlternateDocumentForm" ) def test_get_overridden_document_form(self): bases = get_document_form(models.Document).__bases__ @@ -43,7 +43,7 @@ class TestDocumentFormOverride(TestCase): self.assertIn(AlternateDocumentForm, bases) @override_settings( - WAGTAILDOCS_DOCUMENT_FORM_BASE="wagtail.tests.testapp.media_forms.AlternateDocumentForm" + WAGTAILDOCS_DOCUMENT_FORM_BASE="wagtail.test.testapp.media_forms.AlternateDocumentForm" ) def test_get_overridden_document_multi_form(self): bases = get_document_multi_form(models.Document).__bases__ @@ -51,7 +51,7 @@ class TestDocumentFormOverride(TestCase): self.assertIn(AlternateDocumentForm, bases) @override_settings( - WAGTAILDOCS_DOCUMENT_FORM_BASE="wagtail.tests.testapp.media_forms.AlternateDocumentForm" + WAGTAILDOCS_DOCUMENT_FORM_BASE="wagtail.test.testapp.media_forms.AlternateDocumentForm" ) def test_get_overridden_document_form_widgets(self): form_cls = get_document_form(models.Document) diff --git a/wagtail/documents/tests/test_models.py b/wagtail/documents/tests/test_models.py index 550bea3004..d32c7f10ef 100644 --- a/wagtail/documents/tests/test_models.py +++ b/wagtail/documents/tests/test_models.py @@ -14,8 +14,8 @@ from wagtail.documents import ( signal_handlers, ) from wagtail.images.tests.utils import get_test_image_file -from wagtail.tests.testapp.models import CustomDocument, ReimportedDocumentModel -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import CustomDocument, ReimportedDocumentModel +from wagtail.test.utils import WagtailTestUtils class TestDocumentQuerySet(TestCase): diff --git a/wagtail/documents/tests/test_search.py b/wagtail/documents/tests/test_search.py index db483b08b9..686231bf8d 100644 --- a/wagtail/documents/tests/test_search.py +++ b/wagtail/documents/tests/test_search.py @@ -6,7 +6,7 @@ from django.test.utils import override_settings from django.urls import reverse from wagtail.documents import models -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils @override_settings(_WAGTAILSEARCH_FORCE_AUTO_UPDATE=["elasticsearch"]) diff --git a/wagtail/documents/tests/test_views.py b/wagtail/documents/tests/test_views.py index f97030465d..ea71cd905a 100644 --- a/wagtail/documents/tests/test_views.py +++ b/wagtail/documents/tests/test_views.py @@ -237,7 +237,7 @@ class TestDirectDocumentUrls(TestCase): @override_settings( WAGTAILDOCS_SERVE_METHOD=None, - DEFAULT_FILE_STORAGE="wagtail.tests.dummy_external_storage.DummyExternalStorage", + DEFAULT_FILE_STORAGE="wagtail.test.dummy_external_storage.DummyExternalStorage", ) class TestServeWithExternalStorage(TestCase): """ diff --git a/wagtail/embeds/tests/test_embeds.py b/wagtail/embeds/tests/test_embeds.py index 62aaebf888..af2fe34246 100644 --- a/wagtail/embeds/tests/test_embeds.py +++ b/wagtail/embeds/tests/test_embeds.py @@ -34,7 +34,7 @@ from wagtail.embeds.finders.instagram import ( from wagtail.embeds.finders.oembed import OEmbedFinder as OEmbedFinder from wagtail.embeds.models import Embed from wagtail.embeds.templatetags.wagtailembeds_tags import embed_tag -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils try: import embedly # noqa diff --git a/wagtail/images/tests/test_admin_views.py b/wagtail/images/tests/test_admin_views.py index 71082b601f..eb68c7b5be 100644 --- a/wagtail/images/tests/test_admin_views.py +++ b/wagtail/images/tests/test_admin_views.py @@ -21,8 +21,8 @@ from wagtail.core.models import ( from wagtail.images import get_image_model from wagtail.images.models import UploadedImage from wagtail.images.utils import generate_signature -from wagtail.tests.testapp.models import CustomImage, CustomImageWithAuthor -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import CustomImage, CustomImageWithAuthor +from wagtail.test.utils import WagtailTestUtils from .utils import Image, get_test_image_file @@ -289,7 +289,7 @@ class TestImageAddView(TestCase, WagtailTestUtils): self.assertEqual(image.collection, root_collection) @override_settings( - DEFAULT_FILE_STORAGE="wagtail.tests.dummy_external_storage.DummyExternalStorage" + DEFAULT_FILE_STORAGE="wagtail.test.dummy_external_storage.DummyExternalStorage" ) def test_add_with_external_file_storage(self): response = self.post( @@ -580,7 +580,7 @@ class TestImageEditView(TestCase, WagtailTestUtils): self.assertContains(response, expected_url) @override_settings( - DEFAULT_FILE_STORAGE="wagtail.tests.dummy_external_storage.DummyExternalStorage" + DEFAULT_FILE_STORAGE="wagtail.test.dummy_external_storage.DummyExternalStorage" ) def test_simple_with_external_storage(self): # The view calls get_file_size on the image that closes the file if @@ -680,7 +680,7 @@ class TestImageEditView(TestCase, WagtailTestUtils): self.assertNotEqual(self.image.file_hash, "abcedf") @override_settings( - DEFAULT_FILE_STORAGE="wagtail.tests.dummy_external_storage.DummyExternalStorage" + DEFAULT_FILE_STORAGE="wagtail.test.dummy_external_storage.DummyExternalStorage" ) def test_edit_with_new_image_file_and_external_storage(self): file_content = get_test_image_file().file.getvalue() @@ -725,7 +725,7 @@ class TestImageEditView(TestCase, WagtailTestUtils): self.check_get_missing_file_displays_warning() @override_settings( - DEFAULT_FILE_STORAGE="wagtail.tests.dummy_external_storage.DummyExternalStorage" + DEFAULT_FILE_STORAGE="wagtail.test.dummy_external_storage.DummyExternalStorage" ) def test_get_missing_file_displays_warning_with_custom_storage(self): self.check_get_missing_file_displays_warning() @@ -1364,7 +1364,7 @@ class TestImageChooserUploadView(TestCase, WagtailTestUtils): self.assertContains(response, expected_action_attr) @override_settings( - DEFAULT_FILE_STORAGE="wagtail.tests.dummy_external_storage.DummyExternalStorage" + DEFAULT_FILE_STORAGE="wagtail.test.dummy_external_storage.DummyExternalStorage" ) def test_upload_with_external_storage(self): response = self.client.post( diff --git a/wagtail/images/tests/test_bulk_actions/test_bulk_add_tags.py b/wagtail/images/tests/test_bulk_actions/test_bulk_add_tags.py index 6b5517dd88..77090ff508 100644 --- a/wagtail/images/tests/test_bulk_actions/test_bulk_add_tags.py +++ b/wagtail/images/tests/test_bulk_actions/test_bulk_add_tags.py @@ -4,7 +4,7 @@ from django.urls import reverse from wagtail.images import get_image_model from wagtail.images.tests.utils import get_test_image_file -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils Image = get_image_model() test_file = get_test_image_file() diff --git a/wagtail/images/tests/test_bulk_actions/test_bulk_add_to_collection.py b/wagtail/images/tests/test_bulk_actions/test_bulk_add_to_collection.py index 5e404aab27..8dfc8b7b38 100644 --- a/wagtail/images/tests/test_bulk_actions/test_bulk_add_to_collection.py +++ b/wagtail/images/tests/test_bulk_actions/test_bulk_add_to_collection.py @@ -5,7 +5,7 @@ from django.urls import reverse from wagtail.core.models import Collection from wagtail.images import get_image_model from wagtail.images.tests.utils import get_test_image_file -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils Image = get_image_model() test_file = get_test_image_file() diff --git a/wagtail/images/tests/test_bulk_actions/test_bulk_delete.py b/wagtail/images/tests/test_bulk_actions/test_bulk_delete.py index 0302aa4563..72e7a3a9eb 100644 --- a/wagtail/images/tests/test_bulk_actions/test_bulk_delete.py +++ b/wagtail/images/tests/test_bulk_actions/test_bulk_delete.py @@ -5,7 +5,7 @@ from django.urls import reverse from wagtail.images import get_image_model from wagtail.images.tests.utils import get_test_image_file -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils Image = get_image_model() test_file = get_test_image_file() diff --git a/wagtail/images/tests/test_form_overrides.py b/wagtail/images/tests/test_form_overrides.py index 59f40de768..f56bad6187 100644 --- a/wagtail/images/tests/test_form_overrides.py +++ b/wagtail/images/tests/test_form_overrides.py @@ -5,7 +5,7 @@ from wagtail.admin import widgets from wagtail.admin.widgets import AdminDateTimeInput from wagtail.images import models from wagtail.images.forms import BaseImageForm, get_image_base_form, get_image_form -from wagtail.tests.testapp.media_forms import AlternateImageForm, OverriddenWidget +from wagtail.test.testapp.media_forms import AlternateImageForm, OverriddenWidget class TestImageFormOverride(TestCase): @@ -25,13 +25,13 @@ class TestImageFormOverride(TestCase): self.assertIsInstance(form.fields["focal_point_x"].widget, forms.HiddenInput) @override_settings( - WAGTAILIMAGES_IMAGE_FORM_BASE="wagtail.tests.testapp.media_forms.AlternateImageForm" + WAGTAILIMAGES_IMAGE_FORM_BASE="wagtail.test.testapp.media_forms.AlternateImageForm" ) def test_overridden_base_form(self): self.assertIs(get_image_base_form(), AlternateImageForm) @override_settings( - WAGTAILIMAGES_IMAGE_FORM_BASE="wagtail.tests.testapp.media_forms.AlternateImageForm" + WAGTAILIMAGES_IMAGE_FORM_BASE="wagtail.test.testapp.media_forms.AlternateImageForm" ) def test_get_overridden_image_form(self): bases = get_image_form(models.Image).__bases__ @@ -39,7 +39,7 @@ class TestImageFormOverride(TestCase): self.assertIn(AlternateImageForm, bases) @override_settings( - WAGTAILIMAGES_IMAGE_FORM_BASE="wagtail.tests.testapp.media_forms.AlternateImageForm" + WAGTAILIMAGES_IMAGE_FORM_BASE="wagtail.test.testapp.media_forms.AlternateImageForm" ) def test_get_overridden_image_form_widgets(self): form_cls = get_image_form(models.Image) diff --git a/wagtail/images/tests/test_models.py b/wagtail/images/tests/test_models.py index 3b053c40ed..c291dadf93 100644 --- a/wagtail/images/tests/test_models.py +++ b/wagtail/images/tests/test_models.py @@ -13,12 +13,12 @@ from willow.image import Image as WillowImage from wagtail.core.models import Collection, GroupCollectionPermission, Page from wagtail.images.models import Rendition, SourceImageIOError from wagtail.images.rect import Rect -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( EventPage, EventPageCarouselItem, ReimportedImageModel, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from .utils import Image, get_test_image_file @@ -90,7 +90,7 @@ class TestImage(TestCase): self.assertTrue(self.image.is_stored_locally()) @override_settings( - DEFAULT_FILE_STORAGE="wagtail.tests.dummy_external_storage.DummyExternalStorage" + DEFAULT_FILE_STORAGE="wagtail.test.dummy_external_storage.DummyExternalStorage" ) def test_is_stored_locally_with_external_storage(self): self.assertFalse(self.image.is_stored_locally()) diff --git a/wagtail/images/tests/test_rich_text.py b/wagtail/images/tests/test_rich_text.py index 418c9f9fa6..0ec953a6e2 100644 --- a/wagtail/images/tests/test_rich_text.py +++ b/wagtail/images/tests/test_rich_text.py @@ -5,7 +5,7 @@ from wagtail.images.rich_text import ImageEmbedHandler as FrontendImageEmbedHand from wagtail.images.rich_text.editor_html import ( ImageEmbedHandler as EditorHtmlImageEmbedHandler, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from .utils import Image, get_test_image_file diff --git a/wagtail/images/tests/tests.py b/wagtail/images/tests/tests.py index d03c17acc3..eb23912c2c 100644 --- a/wagtail/images/tests/tests.py +++ b/wagtail/images/tests/tests.py @@ -16,8 +16,8 @@ from wagtail.images.models import Image as WagtailImage from wagtail.images.rect import Rect, Vector from wagtail.images.utils import generate_signature, verify_signature from wagtail.images.views.serve import ServeView -from wagtail.tests.testapp.models import CustomImage, CustomImageFilePath -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.testapp.models import CustomImage, CustomImageFilePath +from wagtail.test.utils import WagtailTestUtils from .utils import Image, get_test_image_file diff --git a/wagtail/images/tests/urls.py b/wagtail/images/tests/urls.py index b9d6fd8363..964872721d 100644 --- a/wagtail/images/tests/urls.py +++ b/wagtail/images/tests/urls.py @@ -1,7 +1,7 @@ from django.urls import re_path from wagtail.images.views.serve import SendFileView, ServeView -from wagtail.tests import dummy_sendfile_backend +from wagtail.test import dummy_sendfile_backend urlpatterns = [ # Format: signature, image_id, filter_spec, filename=None diff --git a/wagtail/locales/tests.py b/wagtail/locales/tests.py index 1699b0f5e6..df9eeb55cd 100644 --- a/wagtail/locales/tests.py +++ b/wagtail/locales/tests.py @@ -5,7 +5,7 @@ from django.urls import reverse from wagtail.admin.admin_url_finder import AdminURLFinder from wagtail.core.models import Locale, Page -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestLocaleIndexView(TestCase, WagtailTestUtils): diff --git a/wagtail/search/tests/elasticsearch_common_tests.py b/wagtail/search/tests/elasticsearch_common_tests.py index caf296caa7..5bedf9ce8c 100644 --- a/wagtail/search/tests/elasticsearch_common_tests.py +++ b/wagtail/search/tests/elasticsearch_common_tests.py @@ -6,7 +6,7 @@ from django.core import management from wagtail.search.query import MATCH_ALL from wagtail.search.tests.test_backends import BackendTests -from wagtail.tests.search import models +from wagtail.test.search import models class ElasticsearchCommonSearchBackendTests(BackendTests): diff --git a/wagtail/search/tests/test_backends.py b/wagtail/search/tests/test_backends.py index 7fd9a995e1..e41ace5554 100644 --- a/wagtail/search/tests/test_backends.py +++ b/wagtail/search/tests/test_backends.py @@ -31,8 +31,8 @@ from wagtail.search.query import ( Phrase, PlainText, ) -from wagtail.tests.search import models -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.search import models +from wagtail.test.utils import WagtailTestUtils class BackendTests(WagtailTestUtils): diff --git a/wagtail/search/tests/test_elasticsearch5_backend.py b/wagtail/search/tests/test_elasticsearch5_backend.py index cacda775ea..0a21e11592 100644 --- a/wagtail/search/tests/test_elasticsearch5_backend.py +++ b/wagtail/search/tests/test_elasticsearch5_backend.py @@ -9,7 +9,7 @@ from elasticsearch.serializer import JSONSerializer from wagtail.search.backends.elasticsearch5 import Elasticsearch5SearchBackend from wagtail.search.query import MATCH_ALL, Phrase -from wagtail.tests.search import models +from wagtail.test.search import models from .elasticsearch_common_tests import ElasticsearchCommonSearchBackendTests diff --git a/wagtail/search/tests/test_elasticsearch6_backend.py b/wagtail/search/tests/test_elasticsearch6_backend.py index 879f7d447f..af44c106e0 100644 --- a/wagtail/search/tests/test_elasticsearch6_backend.py +++ b/wagtail/search/tests/test_elasticsearch6_backend.py @@ -9,7 +9,7 @@ from elasticsearch.serializer import JSONSerializer from wagtail.search.backends.elasticsearch6 import Elasticsearch6SearchBackend from wagtail.search.query import MATCH_ALL, Phrase -from wagtail.tests.search import models +from wagtail.test.search import models from .elasticsearch_common_tests import ElasticsearchCommonSearchBackendTests diff --git a/wagtail/search/tests/test_elasticsearch7_backend.py b/wagtail/search/tests/test_elasticsearch7_backend.py index f90491aa78..ea467c3193 100644 --- a/wagtail/search/tests/test_elasticsearch7_backend.py +++ b/wagtail/search/tests/test_elasticsearch7_backend.py @@ -9,7 +9,7 @@ from elasticsearch.serializer import JSONSerializer from wagtail.search.backends.elasticsearch7 import Elasticsearch7SearchBackend from wagtail.search.query import MATCH_ALL, Phrase -from wagtail.tests.search import models +from wagtail.test.search import models from .elasticsearch_common_tests import ElasticsearchCommonSearchBackendTests diff --git a/wagtail/search/tests/test_index_functions.py b/wagtail/search/tests/test_index_functions.py index 071f90b99f..1e79f0f843 100644 --- a/wagtail/search/tests/test_index_functions.py +++ b/wagtail/search/tests/test_index_functions.py @@ -5,9 +5,9 @@ from django.test import TestCase, override_settings from wagtail.core.models import Page from wagtail.search import index -from wagtail.tests.search import models -from wagtail.tests.testapp.models import SimplePage -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.search import models +from wagtail.test.testapp.models import SimplePage +from wagtail.test.utils import WagtailTestUtils class TestGetIndexedInstance(TestCase): diff --git a/wagtail/search/tests/test_indexed_class.py b/wagtail/search/tests/test_indexed_class.py index 1930ae0d81..8e9701bbb7 100644 --- a/wagtail/search/tests/test_indexed_class.py +++ b/wagtail/search/tests/test_indexed_class.py @@ -5,8 +5,8 @@ from django.test import TestCase from wagtail.core.models import Page from wagtail.search import index -from wagtail.tests.search import models -from wagtail.tests.testapp.models import EventPage, SingleEventPage +from wagtail.test.search import models +from wagtail.test.testapp.models import EventPage, SingleEventPage @contextmanager diff --git a/wagtail/search/tests/test_mysql_backend.py b/wagtail/search/tests/test_mysql_backend.py index 5e07348f7c..5cf4def64c 100644 --- a/wagtail/search/tests/test_mysql_backend.py +++ b/wagtail/search/tests/test_mysql_backend.py @@ -7,7 +7,7 @@ from django.test.utils import override_settings from wagtail.search.query import Not, PlainText from wagtail.search.tests.test_backends import BackendTests -from wagtail.tests.search import models +from wagtail.test.search import models @unittest.skipUnless(connection.vendor == "mysql", "The current database is not MySQL") diff --git a/wagtail/search/tests/test_postgres_backend.py b/wagtail/search/tests/test_postgres_backend.py index ef3a1c2668..6151e64637 100644 --- a/wagtail/search/tests/test_postgres_backend.py +++ b/wagtail/search/tests/test_postgres_backend.py @@ -5,7 +5,7 @@ from django.test import TestCase from django.test.utils import override_settings from wagtail.search.tests.test_backends import BackendTests -from wagtail.tests.search import models +from wagtail.test.search import models @unittest.skipUnless( diff --git a/wagtail/search/tests/test_postgres_stemming.py b/wagtail/search/tests/test_postgres_stemming.py index 932f80285e..7e6562ce52 100644 --- a/wagtail/search/tests/test_postgres_stemming.py +++ b/wagtail/search/tests/test_postgres_stemming.py @@ -5,7 +5,7 @@ from django.db import connection from django.test import TestCase from wagtail.search.backends import get_search_backend -from wagtail.tests.search import models +from wagtail.test.search import models class TestPostgresStemming(TestCase): diff --git a/wagtail/search/tests/test_queries.py b/wagtail/search/tests/test_queries.py index 5c9136a532..60e41fd096 100644 --- a/wagtail/search/tests/test_queries.py +++ b/wagtail/search/tests/test_queries.py @@ -14,7 +14,7 @@ from wagtail.search.utils import ( parse_query_string, separate_filters_from_query, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestHitCounter(TestCase): diff --git a/wagtail/search/tests/test_related_fields.py b/wagtail/search/tests/test_related_fields.py index 34d8617c41..22be00eaf6 100644 --- a/wagtail/search/tests/test_related_fields.py +++ b/wagtail/search/tests/test_related_fields.py @@ -1,8 +1,8 @@ from django.test import TestCase from wagtail.search import index -from wagtail.tests.search.models import Book, Novel -from wagtail.tests.testapp.models import Advert, ManyToManyBlogPage +from wagtail.test.search.models import Book, Novel +from wagtail.test.testapp.models import Advert, ManyToManyBlogPage class TestSelectOnQuerySet(TestCase): diff --git a/wagtail/sites/tests.py b/wagtail/sites/tests.py index 8960adc491..a9c75995b6 100644 --- a/wagtail/sites/tests.py +++ b/wagtail/sites/tests.py @@ -4,7 +4,7 @@ from django.urls import reverse from wagtail.admin.admin_url_finder import AdminURLFinder from wagtail.core.models import Page, Site -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestSiteIndexView(TestCase, WagtailTestUtils): diff --git a/wagtail/snippets/tests.py b/wagtail/snippets/tests.py index 7d13c1528d..58fe9efa86 100644 --- a/wagtail/snippets/tests.py +++ b/wagtail/snippets/tests.py @@ -35,8 +35,8 @@ from wagtail.snippets.widgets import ( SnippetChooserAdapter, SnippetListingButton, ) -from wagtail.tests.snippets.forms import FancySnippetForm -from wagtail.tests.snippets.models import ( +from wagtail.test.snippets.forms import FancySnippetForm +from wagtail.test.snippets.models import ( AlphaSnippet, FancySnippet, FileUploadSnippet, @@ -48,7 +48,7 @@ from wagtail.tests.snippets.models import ( TranslatableSnippet, ZuluSnippet, ) -from wagtail.tests.testapp.models import ( +from wagtail.test.testapp.models import ( Advert, AdvertWithCustomPrimaryKey, AdvertWithCustomUUIDPrimaryKey, @@ -56,7 +56,7 @@ from wagtail.tests.testapp.models import ( SnippetChooserModel, SnippetChooserModelWithCustomPrimaryKey, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils class TestSnippetIndexView(TestCase, WagtailTestUtils): diff --git a/wagtail/tests/.gitignore b/wagtail/test/.gitignore similarity index 100% rename from wagtail/tests/.gitignore rename to wagtail/test/.gitignore diff --git a/wagtail/tests/__init__.py b/wagtail/test/__init__.py similarity index 100% rename from wagtail/tests/__init__.py rename to wagtail/test/__init__.py diff --git a/wagtail/tests/benchmark.py b/wagtail/test/benchmark.py similarity index 100% rename from wagtail/tests/benchmark.py rename to wagtail/test/benchmark.py diff --git a/wagtail/tests/context_processors.py b/wagtail/test/context_processors.py similarity index 100% rename from wagtail/tests/context_processors.py rename to wagtail/test/context_processors.py diff --git a/wagtail/tests/customuser/__init__.py b/wagtail/test/customuser/__init__.py similarity index 100% rename from wagtail/tests/customuser/__init__.py rename to wagtail/test/customuser/__init__.py diff --git a/wagtail/tests/customuser/fields.py b/wagtail/test/customuser/fields.py similarity index 100% rename from wagtail/tests/customuser/fields.py rename to wagtail/test/customuser/fields.py diff --git a/wagtail/tests/customuser/fixtures/test.json b/wagtail/test/customuser/fixtures/test.json similarity index 100% rename from wagtail/tests/customuser/fixtures/test.json rename to wagtail/test/customuser/fixtures/test.json diff --git a/wagtail/tests/customuser/fixtures/test_explorable_pages.json b/wagtail/test/customuser/fixtures/test_explorable_pages.json similarity index 100% rename from wagtail/tests/customuser/fixtures/test_explorable_pages.json rename to wagtail/test/customuser/fixtures/test_explorable_pages.json diff --git a/wagtail/tests/customuser/fixtures/test_specific.json b/wagtail/test/customuser/fixtures/test_specific.json similarity index 100% rename from wagtail/tests/customuser/fixtures/test_specific.json rename to wagtail/test/customuser/fixtures/test_specific.json diff --git a/wagtail/tests/customuser/migrations/0001_initial.py b/wagtail/test/customuser/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/customuser/migrations/0001_initial.py rename to wagtail/test/customuser/migrations/0001_initial.py diff --git a/wagtail/tests/customuser/migrations/0002_added_file_field.py b/wagtail/test/customuser/migrations/0002_added_file_field.py similarity index 100% rename from wagtail/tests/customuser/migrations/0002_added_file_field.py rename to wagtail/test/customuser/migrations/0002_added_file_field.py diff --git a/wagtail/tests/customuser/migrations/0003_delete_emailuser.py b/wagtail/test/customuser/migrations/0003_delete_emailuser.py similarity index 100% rename from wagtail/tests/customuser/migrations/0003_delete_emailuser.py rename to wagtail/test/customuser/migrations/0003_delete_emailuser.py diff --git a/wagtail/tests/customuser/migrations/__init__.py b/wagtail/test/customuser/migrations/__init__.py similarity index 100% rename from wagtail/tests/customuser/migrations/__init__.py rename to wagtail/test/customuser/migrations/__init__.py diff --git a/wagtail/tests/customuser/models.py b/wagtail/test/customuser/models.py similarity index 100% rename from wagtail/tests/customuser/models.py rename to wagtail/test/customuser/models.py diff --git a/wagtail/tests/customuser/tests.py b/wagtail/test/customuser/tests.py similarity index 96% rename from wagtail/tests/customuser/tests.py rename to wagtail/test/customuser/tests.py index d1166aa7a2..ed0d059958 100644 --- a/wagtail/tests/customuser/tests.py +++ b/wagtail/test/customuser/tests.py @@ -5,7 +5,7 @@ from django.conf import settings from django.db import connections from django.test import TestCase -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from .fields import ConvertedValue, ConvertedValueField diff --git a/wagtail/test/demosite/__init__.py b/wagtail/test/demosite/__init__.py new file mode 100644 index 0000000000..9151c39c12 --- /dev/null +++ b/wagtail/test/demosite/__init__.py @@ -0,0 +1 @@ +default_app_config = "wagtail.test.demosite.apps.DemositeAppConfig" diff --git a/wagtail/tests/demosite/apps.py b/wagtail/test/demosite/apps.py similarity index 77% rename from wagtail/tests/demosite/apps.py rename to wagtail/test/demosite/apps.py index ed205738e9..3aad708be8 100644 --- a/wagtail/tests/demosite/apps.py +++ b/wagtail/test/demosite/apps.py @@ -3,4 +3,4 @@ from django.apps import AppConfig class DemositeAppConfig(AppConfig): default_auto_field = "django.db.models.AutoField" - name = "wagtail.tests.demosite" + name = "wagtail.test.demosite" diff --git a/wagtail/tests/demosite/fixtures/demosite.json b/wagtail/test/demosite/fixtures/demosite.json similarity index 100% rename from wagtail/tests/demosite/fixtures/demosite.json rename to wagtail/test/demosite/fixtures/demosite.json diff --git a/wagtail/tests/demosite/migrations/0001_initial.py b/wagtail/test/demosite/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/demosite/migrations/0001_initial.py rename to wagtail/test/demosite/migrations/0001_initial.py diff --git a/wagtail/tests/demosite/migrations/0002_capitalizeverbose.py b/wagtail/test/demosite/migrations/0002_capitalizeverbose.py similarity index 100% rename from wagtail/tests/demosite/migrations/0002_capitalizeverbose.py rename to wagtail/test/demosite/migrations/0002_capitalizeverbose.py diff --git a/wagtail/tests/demosite/migrations/0003_blogentrypagetag_fk_for_django_4.py b/wagtail/test/demosite/migrations/0003_blogentrypagetag_fk_for_django_4.py similarity index 100% rename from wagtail/tests/demosite/migrations/0003_blogentrypagetag_fk_for_django_4.py rename to wagtail/test/demosite/migrations/0003_blogentrypagetag_fk_for_django_4.py diff --git a/wagtail/tests/demosite/migrations/__init__.py b/wagtail/test/demosite/migrations/__init__.py similarity index 100% rename from wagtail/tests/demosite/migrations/__init__.py rename to wagtail/test/demosite/migrations/__init__.py diff --git a/wagtail/tests/demosite/models.py b/wagtail/test/demosite/models.py similarity index 100% rename from wagtail/tests/demosite/models.py rename to wagtail/test/demosite/models.py diff --git a/wagtail/tests/dummy_external_storage.py b/wagtail/test/dummy_external_storage.py similarity index 100% rename from wagtail/tests/dummy_external_storage.py rename to wagtail/test/dummy_external_storage.py diff --git a/wagtail/tests/dummy_sendfile_backend.py b/wagtail/test/dummy_sendfile_backend.py similarity index 100% rename from wagtail/tests/dummy_sendfile_backend.py rename to wagtail/test/dummy_sendfile_backend.py diff --git a/wagtail/tests/emailuser/__init__.py b/wagtail/test/emailuser/__init__.py similarity index 100% rename from wagtail/tests/emailuser/__init__.py rename to wagtail/test/emailuser/__init__.py diff --git a/wagtail/tests/emailuser/fixtures/test.json b/wagtail/test/emailuser/fixtures/test.json similarity index 100% rename from wagtail/tests/emailuser/fixtures/test.json rename to wagtail/test/emailuser/fixtures/test.json diff --git a/wagtail/tests/emailuser/fixtures/test_explorable_pages.json b/wagtail/test/emailuser/fixtures/test_explorable_pages.json similarity index 100% rename from wagtail/tests/emailuser/fixtures/test_explorable_pages.json rename to wagtail/test/emailuser/fixtures/test_explorable_pages.json diff --git a/wagtail/tests/emailuser/fixtures/test_specific.json b/wagtail/test/emailuser/fixtures/test_specific.json similarity index 100% rename from wagtail/tests/emailuser/fixtures/test_specific.json rename to wagtail/test/emailuser/fixtures/test_specific.json diff --git a/wagtail/tests/emailuser/migrations/0001_initial.py b/wagtail/test/emailuser/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/emailuser/migrations/0001_initial.py rename to wagtail/test/emailuser/migrations/0001_initial.py diff --git a/wagtail/tests/emailuser/migrations/__init__.py b/wagtail/test/emailuser/migrations/__init__.py similarity index 100% rename from wagtail/tests/emailuser/migrations/__init__.py rename to wagtail/test/emailuser/migrations/__init__.py diff --git a/wagtail/tests/emailuser/models.py b/wagtail/test/emailuser/models.py similarity index 100% rename from wagtail/tests/emailuser/models.py rename to wagtail/test/emailuser/models.py diff --git a/wagtail/tests/headless_urls.py b/wagtail/test/headless_urls.py similarity index 100% rename from wagtail/tests/headless_urls.py rename to wagtail/test/headless_urls.py diff --git a/wagtail/test/i18n/__init__.py b/wagtail/test/i18n/__init__.py new file mode 100644 index 0000000000..d4fd590d1f --- /dev/null +++ b/wagtail/test/i18n/__init__.py @@ -0,0 +1 @@ +default_app_config = "wagtail.test.i18n.apps.I18nAppConfig" diff --git a/wagtail/tests/i18n/apps.py b/wagtail/test/i18n/apps.py similarity index 79% rename from wagtail/tests/i18n/apps.py rename to wagtail/test/i18n/apps.py index 1e74dc6332..9b928c8cc2 100644 --- a/wagtail/tests/i18n/apps.py +++ b/wagtail/test/i18n/apps.py @@ -3,4 +3,4 @@ from django.apps import AppConfig class I18nAppConfig(AppConfig): default_auto_field = "django.db.models.AutoField" - name = "wagtail.tests.i18n" + name = "wagtail.test.i18n" diff --git a/wagtail/tests/i18n/migrations/0001_initial.py b/wagtail/test/i18n/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/i18n/migrations/0001_initial.py rename to wagtail/test/i18n/migrations/0001_initial.py diff --git a/wagtail/tests/i18n/migrations/0002_clusterabletestmodel_clusterabletestmodelchild_clusterabletestmodeltranslatablechild.py b/wagtail/test/i18n/migrations/0002_clusterabletestmodel_clusterabletestmodelchild_clusterabletestmodeltranslatablechild.py similarity index 100% rename from wagtail/tests/i18n/migrations/0002_clusterabletestmodel_clusterabletestmodelchild_clusterabletestmodeltranslatablechild.py rename to wagtail/test/i18n/migrations/0002_clusterabletestmodel_clusterabletestmodelchild_clusterabletestmodeltranslatablechild.py diff --git a/wagtail/tests/i18n/migrations/__init__.py b/wagtail/test/i18n/migrations/__init__.py similarity index 100% rename from wagtail/tests/i18n/migrations/__init__.py rename to wagtail/test/i18n/migrations/__init__.py diff --git a/wagtail/tests/i18n/models.py b/wagtail/test/i18n/models.py similarity index 100% rename from wagtail/tests/i18n/models.py rename to wagtail/test/i18n/models.py diff --git a/wagtail/tests/manage.py b/wagtail/test/manage.py similarity index 94% rename from wagtail/tests/manage.py rename to wagtail/test/manage.py index 69804f587e..fb2d4516d1 100755 --- a/wagtail/tests/manage.py +++ b/wagtail/test/manage.py @@ -3,7 +3,7 @@ import os import sys if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wagtail.tests.settings") + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "wagtail.test.settings") from django.core.management import execute_from_command_line diff --git a/wagtail/tests/middleware.py b/wagtail/test/middleware.py similarity index 100% rename from wagtail/tests/middleware.py rename to wagtail/test/middleware.py diff --git a/wagtail/test/modeladmintest/__init__.py b/wagtail/test/modeladmintest/__init__.py new file mode 100644 index 0000000000..84a288c9d0 --- /dev/null +++ b/wagtail/test/modeladmintest/__init__.py @@ -0,0 +1 @@ +default_app_config = "wagtail.test.modeladmintest.apps.WagtailTestsAppConfig" diff --git a/wagtail/tests/modeladmintest/apps.py b/wagtail/test/modeladmintest/apps.py similarity index 86% rename from wagtail/tests/modeladmintest/apps.py rename to wagtail/test/modeladmintest/apps.py index 22e7ee51c0..884993a529 100644 --- a/wagtail/tests/modeladmintest/apps.py +++ b/wagtail/test/modeladmintest/apps.py @@ -4,6 +4,6 @@ from django.utils.translation import gettext_lazy as _ class WagtailTestsAppConfig(AppConfig): default_auto_field = "django.db.models.AutoField" - name = "wagtail.tests.modeladmintest" + name = "wagtail.test.modeladmintest" label = "modeladmintest" verbose_name = _("Test Wagtail Model Admin") diff --git a/wagtail/tests/modeladmintest/fixtures/modeladmintest_test.json b/wagtail/test/modeladmintest/fixtures/modeladmintest_test.json similarity index 100% rename from wagtail/tests/modeladmintest/fixtures/modeladmintest_test.json rename to wagtail/test/modeladmintest/fixtures/modeladmintest_test.json diff --git a/wagtail/tests/modeladmintest/forms.py b/wagtail/test/modeladmintest/forms.py similarity index 100% rename from wagtail/tests/modeladmintest/forms.py rename to wagtail/test/modeladmintest/forms.py diff --git a/wagtail/tests/modeladmintest/migrations/0001_initial.py b/wagtail/test/modeladmintest/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0001_initial.py rename to wagtail/test/modeladmintest/migrations/0001_initial.py diff --git a/wagtail/tests/modeladmintest/migrations/0002_token.py b/wagtail/test/modeladmintest/migrations/0002_token.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0002_token.py rename to wagtail/test/modeladmintest/migrations/0002_token.py diff --git a/wagtail/tests/modeladmintest/migrations/0003_publisher.py b/wagtail/test/modeladmintest/migrations/0003_publisher.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0003_publisher.py rename to wagtail/test/modeladmintest/migrations/0003_publisher.py diff --git a/wagtail/tests/modeladmintest/migrations/0004_venuepage.py b/wagtail/test/modeladmintest/migrations/0004_venuepage.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0004_venuepage.py rename to wagtail/test/modeladmintest/migrations/0004_venuepage.py diff --git a/wagtail/tests/modeladmintest/migrations/0005_book_cover_image.py b/wagtail/test/modeladmintest/migrations/0005_book_cover_image.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0005_book_cover_image.py rename to wagtail/test/modeladmintest/migrations/0005_book_cover_image.py diff --git a/wagtail/tests/modeladmintest/migrations/0006_contributor_person_visitor.py b/wagtail/test/modeladmintest/migrations/0006_contributor_person_visitor.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0006_contributor_person_visitor.py rename to wagtail/test/modeladmintest/migrations/0006_contributor_person_visitor.py diff --git a/wagtail/tests/modeladmintest/migrations/0007_friend.py b/wagtail/test/modeladmintest/migrations/0007_friend.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0007_friend.py rename to wagtail/test/modeladmintest/migrations/0007_friend.py diff --git a/wagtail/tests/modeladmintest/migrations/0008_solobook.py b/wagtail/test/modeladmintest/migrations/0008_solobook.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0008_solobook.py rename to wagtail/test/modeladmintest/migrations/0008_solobook.py diff --git a/wagtail/tests/modeladmintest/migrations/0009_relatedlink.py b/wagtail/test/modeladmintest/migrations/0009_relatedlink.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/0009_relatedlink.py rename to wagtail/test/modeladmintest/migrations/0009_relatedlink.py diff --git a/wagtail/tests/modeladmintest/migrations/__init__.py b/wagtail/test/modeladmintest/migrations/__init__.py similarity index 100% rename from wagtail/tests/modeladmintest/migrations/__init__.py rename to wagtail/test/modeladmintest/migrations/__init__.py diff --git a/wagtail/tests/modeladmintest/models.py b/wagtail/test/modeladmintest/models.py similarity index 100% rename from wagtail/tests/modeladmintest/models.py rename to wagtail/test/modeladmintest/models.py diff --git a/wagtail/tests/modeladmintest/wagtail_hooks.py b/wagtail/test/modeladmintest/wagtail_hooks.py similarity index 98% rename from wagtail/tests/modeladmintest/wagtail_hooks.py rename to wagtail/test/modeladmintest/wagtail_hooks.py index ee6dd50b41..1271e80a8a 100644 --- a/wagtail/tests/modeladmintest/wagtail_hooks.py +++ b/wagtail/test/modeladmintest/wagtail_hooks.py @@ -8,7 +8,7 @@ from wagtail.contrib.modeladmin.options import ( ) from wagtail.contrib.modeladmin.views import CreateView, EditView, IndexView from wagtail.core.models import Page -from wagtail.tests.testapp.models import BusinessChild, EventPage, SingleEventPage +from wagtail.test.testapp.models import BusinessChild, EventPage, SingleEventPage from .forms import PublisherModelAdminForm from .models import ( diff --git a/wagtail/tests/non_root_urls.py b/wagtail/test/non_root_urls.py similarity index 100% rename from wagtail/tests/non_root_urls.py rename to wagtail/test/non_root_urls.py diff --git a/wagtail/test/routablepage/__init__.py b/wagtail/test/routablepage/__init__.py new file mode 100644 index 0000000000..bcc149de74 --- /dev/null +++ b/wagtail/test/routablepage/__init__.py @@ -0,0 +1 @@ +default_app_config = "wagtail.test.routablepage.apps.WagtailRoutablePageTestsAppConfig" diff --git a/wagtail/tests/routablepage/apps.py b/wagtail/test/routablepage/apps.py similarity index 85% rename from wagtail/tests/routablepage/apps.py rename to wagtail/test/routablepage/apps.py index 0de70471e9..3cee91ecca 100644 --- a/wagtail/tests/routablepage/apps.py +++ b/wagtail/test/routablepage/apps.py @@ -3,6 +3,6 @@ from django.utils.translation import gettext_lazy as _ class WagtailRoutablePageTestsAppConfig(AppConfig): - name = "wagtail.tests.routablepage" + name = "wagtail.test.routablepage" label = "routablepagetests" verbose_name = _("Wagtail routable page tests") diff --git a/wagtail/tests/routablepage/migrations/0001_initial.py b/wagtail/test/routablepage/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/routablepage/migrations/0001_initial.py rename to wagtail/test/routablepage/migrations/0001_initial.py diff --git a/wagtail/tests/routablepage/migrations/0002_routablepagewithoutindexroutetest.py b/wagtail/test/routablepage/migrations/0002_routablepagewithoutindexroutetest.py similarity index 100% rename from wagtail/tests/routablepage/migrations/0002_routablepagewithoutindexroutetest.py rename to wagtail/test/routablepage/migrations/0002_routablepagewithoutindexroutetest.py diff --git a/wagtail/tests/routablepage/migrations/__init__.py b/wagtail/test/routablepage/migrations/__init__.py similarity index 100% rename from wagtail/tests/routablepage/migrations/__init__.py rename to wagtail/test/routablepage/migrations/__init__.py diff --git a/wagtail/tests/routablepage/models.py b/wagtail/test/routablepage/models.py similarity index 100% rename from wagtail/tests/routablepage/models.py rename to wagtail/test/routablepage/models.py diff --git a/wagtail/tests/routablepage/templates/routablepagetests/routable_page_test.html b/wagtail/test/routablepage/templates/routablepagetests/routable_page_test.html similarity index 100% rename from wagtail/tests/routablepage/templates/routablepagetests/routable_page_test.html rename to wagtail/test/routablepage/templates/routablepagetests/routable_page_test.html diff --git a/wagtail/tests/routablepage/templates/routablepagetests/routable_page_test_alternate.html b/wagtail/test/routablepage/templates/routablepagetests/routable_page_test_alternate.html similarity index 100% rename from wagtail/tests/routablepage/templates/routablepagetests/routable_page_test_alternate.html rename to wagtail/test/routablepage/templates/routablepagetests/routable_page_test_alternate.html diff --git a/wagtail/test/search/__init__.py b/wagtail/test/search/__init__.py new file mode 100644 index 0000000000..d30927ed9d --- /dev/null +++ b/wagtail/test/search/__init__.py @@ -0,0 +1 @@ +default_app_config = "wagtail.test.search.apps.WagtailSearchTestsAppConfig" diff --git a/wagtail/tests/search/apps.py b/wagtail/test/search/apps.py similarity index 88% rename from wagtail/tests/search/apps.py rename to wagtail/test/search/apps.py index 0564c3365d..d09c37f98e 100644 --- a/wagtail/tests/search/apps.py +++ b/wagtail/test/search/apps.py @@ -4,6 +4,6 @@ from django.utils.translation import gettext_lazy as _ class WagtailSearchTestsAppConfig(AppConfig): default_auto_field = "django.db.models.AutoField" - name = "wagtail.tests.search" + name = "wagtail.test.search" label = "searchtests" verbose_name = _("Wagtail search tests") diff --git a/wagtail/tests/search/fixtures/search.json b/wagtail/test/search/fixtures/search.json similarity index 100% rename from wagtail/tests/search/fixtures/search.json rename to wagtail/test/search/fixtures/search.json diff --git a/wagtail/tests/search/migrations/0001_initial.py b/wagtail/test/search/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/search/migrations/0001_initial.py rename to wagtail/test/search/migrations/0001_initial.py diff --git a/wagtail/tests/search/migrations/__init__.py b/wagtail/test/search/migrations/__init__.py similarity index 100% rename from wagtail/tests/search/migrations/__init__.py rename to wagtail/test/search/migrations/__init__.py diff --git a/wagtail/tests/search/models.py b/wagtail/test/search/models.py similarity index 100% rename from wagtail/tests/search/models.py rename to wagtail/test/search/models.py diff --git a/wagtail/tests/settings.py b/wagtail/test/settings.py similarity index 92% rename from wagtail/tests/settings.py rename to wagtail/test/settings.py index bc14ab1784..138b2e5623 100644 --- a/wagtail/tests/settings.py +++ b/wagtail/test/settings.py @@ -45,7 +45,7 @@ if DATABASES["default"]["ENGINE"] == "django.db.backends.mysql": SECRET_KEY = "not needed" -ROOT_URLCONF = "wagtail.tests.urls" +ROOT_URLCONF = "wagtail.test.urls" STATIC_URL = "/static/" @@ -72,7 +72,7 @@ TEMPLATES = [ "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", "django.template.context_processors.request", - "wagtail.tests.context_processors.do_not_use_static_url", + "wagtail.test.context_processors.do_not_use_static_url", "wagtail.contrib.settings.context_processors.settings", ], "debug": True, # required in order to catch template errors @@ -82,7 +82,7 @@ TEMPLATES = [ "BACKEND": "django.template.backends.jinja2.Jinja2", "APP_DIRS": False, "DIRS": [ - os.path.join(WAGTAIL_ROOT, "tests", "testapp", "jinja2_templates"), + os.path.join(WAGTAIL_ROOT, "test", "testapp", "jinja2_templates"), ], "OPTIONS": { "extensions": [ @@ -103,7 +103,7 @@ MIDDLEWARE = ( "django.contrib.auth.middleware.AuthenticationMiddleware", "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", - "wagtail.tests.middleware.BlockDodgyUserAgentMiddleware", + "wagtail.test.middleware.BlockDodgyUserAgentMiddleware", "wagtail.contrib.redirects.middleware.RedirectMiddleware", ) @@ -112,13 +112,13 @@ INSTALLED_APPS = [ # There's nothing special about wagtailredirects, we just need to have one # app which uses AppConfigs to test that hooks load properly "wagtail.contrib.redirects.apps.WagtailRedirectsAppConfig", - "wagtail.tests.testapp", - "wagtail.tests.demosite", - "wagtail.tests.snippets", - "wagtail.tests.routablepage", - "wagtail.tests.search", - "wagtail.tests.modeladmintest", - "wagtail.tests.i18n", + "wagtail.test.testapp", + "wagtail.test.demosite", + "wagtail.test.snippets", + "wagtail.test.routablepage", + "wagtail.test.search", + "wagtail.test.modeladmintest", + "wagtail.test.i18n", "wagtail.contrib.simple_translation", "wagtail.contrib.styleguide", "wagtail.contrib.routable_page", @@ -177,11 +177,11 @@ WAGTAILSEARCH_BACKENDS = { EMAIL_BACKEND = "django.core.mail.backends.console.EmailBackend" if os.environ.get("USE_EMAIL_USER_MODEL"): - INSTALLED_APPS.append("wagtail.tests.emailuser") + INSTALLED_APPS.append("wagtail.test.emailuser") AUTH_USER_MODEL = "emailuser.EmailUser" print("EmailUser (no username) user model active") else: - INSTALLED_APPS.append("wagtail.tests.customuser") + INSTALLED_APPS.append("wagtail.test.customuser") AUTH_USER_MODEL = "customuser.CustomUser" # Extra user field for custom user edit and create form tests. This setting # needs to here because it is used at the module level of wagtailusers.forms @@ -218,7 +218,7 @@ WAGTAIL_SITE_NAME = "Test Site" WAGTAILADMIN_RICH_TEXT_EDITORS = { "default": {"WIDGET": "wagtail.admin.rich_text.DraftailRichTextArea"}, - "custom": {"WIDGET": "wagtail.tests.testapp.rich_text.CustomRichTextArea"}, + "custom": {"WIDGET": "wagtail.test.testapp.rich_text.CustomRichTextArea"}, } WAGTAIL_CONTENT_LANGUAGES = [ diff --git a/wagtail/tests/settings_ui.py b/wagtail/test/settings_ui.py similarity index 100% rename from wagtail/tests/settings_ui.py rename to wagtail/test/settings_ui.py diff --git a/wagtail/test/snippets/__init__.py b/wagtail/test/snippets/__init__.py new file mode 100644 index 0000000000..9e19c8ca53 --- /dev/null +++ b/wagtail/test/snippets/__init__.py @@ -0,0 +1 @@ +default_app_config = "wagtail.test.snippets.apps.WagtailSnippetsTestsAppConfig" diff --git a/wagtail/tests/snippets/apps.py b/wagtail/test/snippets/apps.py similarity index 88% rename from wagtail/tests/snippets/apps.py rename to wagtail/test/snippets/apps.py index 25a59d3499..13e6f1bc5f 100644 --- a/wagtail/tests/snippets/apps.py +++ b/wagtail/test/snippets/apps.py @@ -4,6 +4,6 @@ from django.utils.translation import gettext_lazy as _ class WagtailSnippetsTestsAppConfig(AppConfig): default_auto_field = "django.db.models.AutoField" - name = "wagtail.tests.snippets" + name = "wagtail.test.snippets" label = "snippetstests" verbose_name = _("Wagtail snippets tests") diff --git a/wagtail/tests/snippets/forms.py b/wagtail/test/snippets/forms.py similarity index 100% rename from wagtail/tests/snippets/forms.py rename to wagtail/test/snippets/forms.py diff --git a/wagtail/tests/snippets/migrations/0001_initial.py b/wagtail/test/snippets/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/snippets/migrations/0001_initial.py rename to wagtail/test/snippets/migrations/0001_initial.py diff --git a/wagtail/tests/snippets/migrations/0002_searchablesnippet.py b/wagtail/test/snippets/migrations/0002_searchablesnippet.py similarity index 100% rename from wagtail/tests/snippets/migrations/0002_searchablesnippet.py rename to wagtail/test/snippets/migrations/0002_searchablesnippet.py diff --git a/wagtail/tests/snippets/migrations/0003_fancysnippet_standardsnippet.py b/wagtail/test/snippets/migrations/0003_fancysnippet_standardsnippet.py similarity index 100% rename from wagtail/tests/snippets/migrations/0003_fancysnippet_standardsnippet.py rename to wagtail/test/snippets/migrations/0003_fancysnippet_standardsnippet.py diff --git a/wagtail/tests/snippets/migrations/0004_fileuploadsnippet.py b/wagtail/test/snippets/migrations/0004_fileuploadsnippet.py similarity index 100% rename from wagtail/tests/snippets/migrations/0004_fileuploadsnippet.py rename to wagtail/test/snippets/migrations/0004_fileuploadsnippet.py diff --git a/wagtail/tests/snippets/migrations/0005_multisectionrichtextsnippet_richtextsection.py b/wagtail/test/snippets/migrations/0005_multisectionrichtextsnippet_richtextsection.py similarity index 100% rename from wagtail/tests/snippets/migrations/0005_multisectionrichtextsnippet_richtextsection.py rename to wagtail/test/snippets/migrations/0005_multisectionrichtextsnippet_richtextsection.py diff --git a/wagtail/tests/snippets/migrations/0006_standarsnippetwithcustomprimarykey.py b/wagtail/test/snippets/migrations/0006_standarsnippetwithcustomprimarykey.py similarity index 100% rename from wagtail/tests/snippets/migrations/0006_standarsnippetwithcustomprimarykey.py rename to wagtail/test/snippets/migrations/0006_standarsnippetwithcustomprimarykey.py diff --git a/wagtail/tests/snippets/migrations/0007_translatablesnippet.py b/wagtail/test/snippets/migrations/0007_translatablesnippet.py similarity index 100% rename from wagtail/tests/snippets/migrations/0007_translatablesnippet.py rename to wagtail/test/snippets/migrations/0007_translatablesnippet.py diff --git a/wagtail/tests/snippets/migrations/__init__.py b/wagtail/test/snippets/migrations/__init__.py similarity index 100% rename from wagtail/tests/snippets/migrations/__init__.py rename to wagtail/test/snippets/migrations/__init__.py diff --git a/wagtail/tests/snippets/models.py b/wagtail/test/snippets/models.py similarity index 100% rename from wagtail/tests/snippets/models.py rename to wagtail/test/snippets/models.py diff --git a/wagtail/test/testapp/__init__.py b/wagtail/test/testapp/__init__.py new file mode 100644 index 0000000000..1694a17053 --- /dev/null +++ b/wagtail/test/testapp/__init__.py @@ -0,0 +1 @@ +default_app_config = "wagtail.test.testapp.apps.WagtailTestsAppConfig" diff --git a/wagtail/tests/testapp/apps.py b/wagtail/test/testapp/apps.py similarity index 87% rename from wagtail/tests/testapp/apps.py rename to wagtail/test/testapp/apps.py index e303446e0a..a3e3c9f226 100644 --- a/wagtail/tests/testapp/apps.py +++ b/wagtail/test/testapp/apps.py @@ -4,6 +4,6 @@ from django.utils.translation import gettext_lazy as _ class WagtailTestsAppConfig(AppConfig): default_auto_field = "django.db.models.AutoField" - name = "wagtail.tests.testapp" + name = "wagtail.test.testapp" label = "tests" verbose_name = _("Wagtail tests") diff --git a/wagtail/tests/testapp/blocks.py b/wagtail/test/testapp/blocks.py similarity index 100% rename from wagtail/tests/testapp/blocks.py rename to wagtail/test/testapp/blocks.py diff --git a/wagtail/tests/testapp/fixtures/test.json b/wagtail/test/testapp/fixtures/test.json similarity index 100% rename from wagtail/tests/testapp/fixtures/test.json rename to wagtail/test/testapp/fixtures/test.json diff --git a/wagtail/tests/testapp/fixtures/test_explorable_pages.json b/wagtail/test/testapp/fixtures/test_explorable_pages.json similarity index 100% rename from wagtail/tests/testapp/fixtures/test_explorable_pages.json rename to wagtail/test/testapp/fixtures/test_explorable_pages.json diff --git a/wagtail/tests/testapp/fixtures/test_specific.json b/wagtail/test/testapp/fixtures/test_specific.json similarity index 100% rename from wagtail/tests/testapp/fixtures/test_specific.json rename to wagtail/test/testapp/fixtures/test_specific.json diff --git a/wagtail/tests/testapp/forms.py b/wagtail/test/testapp/forms.py similarity index 100% rename from wagtail/tests/testapp/forms.py rename to wagtail/test/testapp/forms.py diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/heading_block.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/heading_block.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/heading_block.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/heading_block.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/include_block_autoescape_off_test.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/include_block_autoescape_off_test.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/include_block_autoescape_off_test.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/include_block_autoescape_off_test.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/include_block_tag_with_additional_variable.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/include_block_tag_with_additional_variable.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/include_block_tag_with_additional_variable.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/include_block_tag_with_additional_variable.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/include_block_test.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/include_block_test.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/include_block_test.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/include_block_test.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/include_block_test_with_filter.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/include_block_test_with_filter.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/include_block_test_with_filter.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/include_block_test_with_filter.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/paragraph.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/paragraph.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/paragraph.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/paragraph.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/rich_text.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/rich_text.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/rich_text.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/rich_text.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/section_block.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/section_block.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/section_block.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/section_block.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/stream.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/stream.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/stream.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/stream.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/stream_with_language.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/stream_with_language.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/stream_with_language.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/stream_with_language.html diff --git a/wagtail/tests/testapp/jinja2_templates/tests/jinja2/struct_block_form_template.html b/wagtail/test/testapp/jinja2_templates/tests/jinja2/struct_block_form_template.html similarity index 100% rename from wagtail/tests/testapp/jinja2_templates/tests/jinja2/struct_block_form_template.html rename to wagtail/test/testapp/jinja2_templates/tests/jinja2/struct_block_form_template.html diff --git a/wagtail/tests/testapp/media_forms.py b/wagtail/test/testapp/media_forms.py similarity index 100% rename from wagtail/tests/testapp/media_forms.py rename to wagtail/test/testapp/media_forms.py diff --git a/wagtail/tests/testapp/migrations/0001_initial.py b/wagtail/test/testapp/migrations/0001_initial.py similarity index 100% rename from wagtail/tests/testapp/migrations/0001_initial.py rename to wagtail/test/testapp/migrations/0001_initial.py diff --git a/wagtail/tests/testapp/migrations/0002_customimage_collections.py b/wagtail/test/testapp/migrations/0002_customimage_collections.py similarity index 100% rename from wagtail/tests/testapp/migrations/0002_customimage_collections.py rename to wagtail/test/testapp/migrations/0002_customimage_collections.py diff --git a/wagtail/tests/testapp/migrations/0003_onetoonepage.py b/wagtail/test/testapp/migrations/0003_onetoonepage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0003_onetoonepage.py rename to wagtail/test/testapp/migrations/0003_onetoonepage.py diff --git a/wagtail/tests/testapp/migrations/0004_fileuploadsetting.py b/wagtail/test/testapp/migrations/0004_fileuploadsetting.py similarity index 100% rename from wagtail/tests/testapp/migrations/0004_fileuploadsetting.py rename to wagtail/test/testapp/migrations/0004_fileuploadsetting.py diff --git a/wagtail/tests/testapp/migrations/0005_customrichblockfieldpage_customrichtextfieldpage_defaultrichblockfieldpage_defaultrichtextfieldpage.py b/wagtail/test/testapp/migrations/0005_customrichblockfieldpage_customrichtextfieldpage_defaultrichblockfieldpage_defaultrichtextfieldpage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0005_customrichblockfieldpage_customrichtextfieldpage_defaultrichblockfieldpage_defaultrichtextfieldpage.py rename to wagtail/test/testapp/migrations/0005_customrichblockfieldpage_customrichtextfieldpage_defaultrichblockfieldpage_defaultrichtextfieldpage.py diff --git a/wagtail/tests/testapp/migrations/0006_sectionedrichtextpage_sectionedrichtextpagesection.py b/wagtail/test/testapp/migrations/0006_sectionedrichtextpage_sectionedrichtextpagesection.py similarity index 100% rename from wagtail/tests/testapp/migrations/0006_sectionedrichtextpage_sectionedrichtextpagesection.py rename to wagtail/test/testapp/migrations/0006_sectionedrichtextpage_sectionedrichtextpagesection.py diff --git a/wagtail/tests/testapp/migrations/0007_jadeformpage.py b/wagtail/test/testapp/migrations/0007_jadeformpage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0007_jadeformpage.py rename to wagtail/test/testapp/migrations/0007_jadeformpage.py diff --git a/wagtail/tests/testapp/migrations/0008_inlinestreampage_inlinestreampagesection.py b/wagtail/test/testapp/migrations/0008_inlinestreampage_inlinestreampagesection.py similarity index 100% rename from wagtail/tests/testapp/migrations/0008_inlinestreampage_inlinestreampagesection.py rename to wagtail/test/testapp/migrations/0008_inlinestreampage_inlinestreampagesection.py diff --git a/wagtail/tests/testapp/migrations/0009_defaultstreampage.py b/wagtail/test/testapp/migrations/0009_defaultstreampage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0009_defaultstreampage.py rename to wagtail/test/testapp/migrations/0009_defaultstreampage.py diff --git a/wagtail/tests/testapp/migrations/0010_auto_20160823_1056.py b/wagtail/test/testapp/migrations/0010_auto_20160823_1056.py similarity index 100% rename from wagtail/tests/testapp/migrations/0010_auto_20160823_1056.py rename to wagtail/test/testapp/migrations/0010_auto_20160823_1056.py diff --git a/wagtail/tests/testapp/migrations/0011_userprofile.py b/wagtail/test/testapp/migrations/0011_userprofile.py similarity index 100% rename from wagtail/tests/testapp/migrations/0011_userprofile.py rename to wagtail/test/testapp/migrations/0011_userprofile.py diff --git a/wagtail/tests/testapp/migrations/0012_panelsettings_tabbedsettings.py b/wagtail/test/testapp/migrations/0012_panelsettings_tabbedsettings.py similarity index 100% rename from wagtail/tests/testapp/migrations/0012_panelsettings_tabbedsettings.py rename to wagtail/test/testapp/migrations/0012_panelsettings_tabbedsettings.py diff --git a/wagtail/tests/testapp/migrations/0013_auto_20161220_1957.py b/wagtail/test/testapp/migrations/0013_auto_20161220_1957.py similarity index 83% rename from wagtail/tests/testapp/migrations/0013_auto_20161220_1957.py rename to wagtail/test/testapp/migrations/0013_auto_20161220_1957.py index 47f78f8432..1476e92cec 100644 --- a/wagtail/tests/testapp/migrations/0013_auto_20161220_1957.py +++ b/wagtail/test/testapp/migrations/0013_auto_20161220_1957.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-20 10:57 from django.db import migrations -import wagtail.tests.testapp.models +import wagtail.test.testapp.models import wagtail.core.blocks import wagtail.core.fields @@ -20,7 +20,7 @@ class Migration(migrations.Migration): [ ("text", wagtail.core.blocks.CharBlock()), ("rich_text", wagtail.core.blocks.RichTextBlock()), - ("image", wagtail.tests.testapp.models.ExtendedImageChooserBlock()), + ("image", wagtail.test.testapp.models.ExtendedImageChooserBlock()), ] ), ), diff --git a/wagtail/tests/testapp/migrations/0014_event_categories.py b/wagtail/test/testapp/migrations/0014_event_categories.py similarity index 100% rename from wagtail/tests/testapp/migrations/0014_event_categories.py rename to wagtail/test/testapp/migrations/0014_event_categories.py diff --git a/wagtail/tests/testapp/migrations/0015_auto_20170210_2058.py b/wagtail/test/testapp/migrations/0015_auto_20170210_2058.py similarity index 100% rename from wagtail/tests/testapp/migrations/0015_auto_20170210_2058.py rename to wagtail/test/testapp/migrations/0015_auto_20170210_2058.py diff --git a/wagtail/tests/testapp/migrations/0016_auto_20170303_2340.py b/wagtail/test/testapp/migrations/0016_auto_20170303_2340.py similarity index 100% rename from wagtail/tests/testapp/migrations/0016_auto_20170303_2340.py rename to wagtail/test/testapp/migrations/0016_auto_20170303_2340.py diff --git a/wagtail/tests/testapp/migrations/0017_alwaysshowinmenuspage.py b/wagtail/test/testapp/migrations/0017_alwaysshowinmenuspage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0017_alwaysshowinmenuspage.py rename to wagtail/test/testapp/migrations/0017_alwaysshowinmenuspage.py diff --git a/wagtail/tests/testapp/migrations/0018_multiselect_form_field.py b/wagtail/test/testapp/migrations/0018_multiselect_form_field.py similarity index 100% rename from wagtail/tests/testapp/migrations/0018_multiselect_form_field.py rename to wagtail/test/testapp/migrations/0018_multiselect_form_field.py diff --git a/wagtail/tests/testapp/migrations/0019_richtextfieldwithfeaturespage.py b/wagtail/test/testapp/migrations/0019_richtextfieldwithfeaturespage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0019_richtextfieldwithfeaturespage.py rename to wagtail/test/testapp/migrations/0019_richtextfieldwithfeaturespage.py diff --git a/wagtail/tests/testapp/migrations/0020_customdocument.py b/wagtail/test/testapp/migrations/0020_customdocument.py similarity index 100% rename from wagtail/tests/testapp/migrations/0020_customdocument.py rename to wagtail/test/testapp/migrations/0020_customdocument.py diff --git a/wagtail/tests/testapp/migrations/0021_hidden_form_field.py b/wagtail/test/testapp/migrations/0021_hidden_form_field.py similarity index 100% rename from wagtail/tests/testapp/migrations/0021_hidden_form_field.py rename to wagtail/test/testapp/migrations/0021_hidden_form_field.py diff --git a/wagtail/tests/testapp/migrations/0022_pagewithexcludedcopyfield.py b/wagtail/test/testapp/migrations/0022_pagewithexcludedcopyfield.py similarity index 100% rename from wagtail/tests/testapp/migrations/0022_pagewithexcludedcopyfield.py rename to wagtail/test/testapp/migrations/0022_pagewithexcludedcopyfield.py diff --git a/wagtail/tests/testapp/migrations/0023_formpagewithredirect_redirectformfield.py b/wagtail/test/testapp/migrations/0023_formpagewithredirect_redirectformfield.py similarity index 100% rename from wagtail/tests/testapp/migrations/0023_formpagewithredirect_redirectformfield.py rename to wagtail/test/testapp/migrations/0023_formpagewithredirect_redirectformfield.py diff --git a/wagtail/tests/testapp/migrations/0024_tableblockstreampage.py b/wagtail/test/testapp/migrations/0024_tableblockstreampage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0024_tableblockstreampage.py rename to wagtail/test/testapp/migrations/0024_tableblockstreampage.py diff --git a/wagtail/tests/testapp/migrations/0025_advertwithcustomprimarykey.py b/wagtail/test/testapp/migrations/0025_advertwithcustomprimarykey.py similarity index 100% rename from wagtail/tests/testapp/migrations/0025_advertwithcustomprimarykey.py rename to wagtail/test/testapp/migrations/0025_advertwithcustomprimarykey.py diff --git a/wagtail/tests/testapp/migrations/0026_auto_20171207_1657.py b/wagtail/test/testapp/migrations/0026_auto_20171207_1657.py similarity index 100% rename from wagtail/tests/testapp/migrations/0026_auto_20171207_1657.py rename to wagtail/test/testapp/migrations/0026_auto_20171207_1657.py diff --git a/wagtail/tests/testapp/migrations/0027_auto_20180110_1727.py b/wagtail/test/testapp/migrations/0027_auto_20180110_1727.py similarity index 100% rename from wagtail/tests/testapp/migrations/0027_auto_20180110_1727.py rename to wagtail/test/testapp/migrations/0027_auto_20180110_1727.py diff --git a/wagtail/tests/testapp/migrations/0028_headcountrelatedmodelusingpk.py b/wagtail/test/testapp/migrations/0028_headcountrelatedmodelusingpk.py similarity index 100% rename from wagtail/tests/testapp/migrations/0028_headcountrelatedmodelusingpk.py rename to wagtail/test/testapp/migrations/0028_headcountrelatedmodelusingpk.py diff --git a/wagtail/tests/testapp/migrations/0029_auto_20180215_1950.py b/wagtail/test/testapp/migrations/0029_auto_20180215_1950.py similarity index 88% rename from wagtail/tests/testapp/migrations/0029_auto_20180215_1950.py rename to wagtail/test/testapp/migrations/0029_auto_20180215_1950.py index b59b5c3806..2db3ce96db 100644 --- a/wagtail/tests/testapp/migrations/0029_auto_20180215_1950.py +++ b/wagtail/test/testapp/migrations/0029_auto_20180215_1950.py @@ -3,7 +3,7 @@ from django.db import migrations import wagtail.core.blocks import wagtail.core.fields -import wagtail.tests.testapp.models +import wagtail.test.testapp.models class Migration(migrations.Migration): @@ -20,7 +20,7 @@ class Migration(migrations.Migration): ( ("text", wagtail.core.blocks.CharBlock()), ("rich_text", wagtail.core.blocks.RichTextBlock()), - ("image", wagtail.tests.testapp.models.ExtendedImageChooserBlock()), + ("image", wagtail.test.testapp.models.ExtendedImageChooserBlock()), ( "product", wagtail.core.blocks.StructBlock( diff --git a/wagtail/tests/testapp/migrations/0030_formclassadditionalfieldpage.py b/wagtail/test/testapp/migrations/0030_formclassadditionalfieldpage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0030_formclassadditionalfieldpage.py rename to wagtail/test/testapp/migrations/0030_formclassadditionalfieldpage.py diff --git a/wagtail/tests/testapp/migrations/0031_customdocument_file_size.py b/wagtail/test/testapp/migrations/0031_customdocument_file_size.py similarity index 100% rename from wagtail/tests/testapp/migrations/0031_customdocument_file_size.py rename to wagtail/test/testapp/migrations/0031_customdocument_file_size.py diff --git a/wagtail/tests/testapp/migrations/0032_auto_20180505_0008.py b/wagtail/test/testapp/migrations/0032_auto_20180505_0008.py similarity index 100% rename from wagtail/tests/testapp/migrations/0032_auto_20180505_0008.py rename to wagtail/test/testapp/migrations/0032_auto_20180505_0008.py diff --git a/wagtail/tests/testapp/migrations/0033_eventpagespeaker_related_query_name.py b/wagtail/test/testapp/migrations/0033_eventpagespeaker_related_query_name.py similarity index 100% rename from wagtail/tests/testapp/migrations/0033_eventpagespeaker_related_query_name.py rename to wagtail/test/testapp/migrations/0033_eventpagespeaker_related_query_name.py diff --git a/wagtail/tests/testapp/migrations/0034_advertwithuuidcustomprimarykey.py b/wagtail/test/testapp/migrations/0034_advertwithuuidcustomprimarykey.py similarity index 100% rename from wagtail/tests/testapp/migrations/0034_advertwithuuidcustomprimarykey.py rename to wagtail/test/testapp/migrations/0034_advertwithuuidcustomprimarykey.py diff --git a/wagtail/tests/testapp/migrations/0035_streamfieldmigrationmodels.py b/wagtail/test/testapp/migrations/0035_streamfieldmigrationmodels.py similarity index 100% rename from wagtail/tests/testapp/migrations/0035_streamfieldmigrationmodels.py rename to wagtail/test/testapp/migrations/0035_streamfieldmigrationmodels.py diff --git a/wagtail/tests/testapp/migrations/0036_streamfieldmigrationmodels_add_field.py b/wagtail/test/testapp/migrations/0036_streamfieldmigrationmodels_add_field.py similarity index 100% rename from wagtail/tests/testapp/migrations/0036_streamfieldmigrationmodels_add_field.py rename to wagtail/test/testapp/migrations/0036_streamfieldmigrationmodels_add_field.py diff --git a/wagtail/tests/testapp/migrations/0037_customdocument_verbose_name_plural.py b/wagtail/test/testapp/migrations/0037_customdocument_verbose_name_plural.py similarity index 100% rename from wagtail/tests/testapp/migrations/0037_customdocument_verbose_name_plural.py rename to wagtail/test/testapp/migrations/0037_customdocument_verbose_name_plural.py diff --git a/wagtail/tests/testapp/migrations/0038_singletonpageviamaxcount.py b/wagtail/test/testapp/migrations/0038_singletonpageviamaxcount.py similarity index 100% rename from wagtail/tests/testapp/migrations/0038_singletonpageviamaxcount.py rename to wagtail/test/testapp/migrations/0038_singletonpageviamaxcount.py diff --git a/wagtail/tests/testapp/migrations/0039_customdocument_description.py b/wagtail/test/testapp/migrations/0039_customdocument_description.py similarity index 100% rename from wagtail/tests/testapp/migrations/0039_customdocument_description.py rename to wagtail/test/testapp/migrations/0039_customdocument_description.py diff --git a/wagtail/tests/testapp/migrations/0040_customdocument_file_hash.py b/wagtail/test/testapp/migrations/0040_customdocument_file_hash.py similarity index 100% rename from wagtail/tests/testapp/migrations/0040_customdocument_file_hash.py rename to wagtail/test/testapp/migrations/0040_customdocument_file_hash.py diff --git a/wagtail/tests/testapp/migrations/0041_secretpage.py b/wagtail/test/testapp/migrations/0041_secretpage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0041_secretpage.py rename to wagtail/test/testapp/migrations/0041_secretpage.py diff --git a/wagtail/tests/testapp/migrations/0042_simplechildpage_simpleparentpage.py b/wagtail/test/testapp/migrations/0042_simplechildpage_simpleparentpage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0042_simplechildpage_simpleparentpage.py rename to wagtail/test/testapp/migrations/0042_simplechildpage_simpleparentpage.py diff --git a/wagtail/tests/testapp/migrations/0043_customdocument_fancy_description.py b/wagtail/test/testapp/migrations/0043_customdocument_fancy_description.py similarity index 100% rename from wagtail/tests/testapp/migrations/0043_customdocument_fancy_description.py rename to wagtail/test/testapp/migrations/0043_customdocument_fancy_description.py diff --git a/wagtail/tests/testapp/migrations/0043_eventpagespeakeraward.py b/wagtail/test/testapp/migrations/0043_eventpagespeakeraward.py similarity index 100% rename from wagtail/tests/testapp/migrations/0043_eventpagespeakeraward.py rename to wagtail/test/testapp/migrations/0043_eventpagespeakeraward.py diff --git a/wagtail/tests/testapp/migrations/0044_merge_20191203_0116.py b/wagtail/test/testapp/migrations/0044_merge_20191203_0116.py similarity index 100% rename from wagtail/tests/testapp/migrations/0044_merge_20191203_0116.py rename to wagtail/test/testapp/migrations/0044_merge_20191203_0116.py diff --git a/wagtail/tests/testapp/migrations/0045_add_formsubmission_verbose_name_plural.py b/wagtail/test/testapp/migrations/0045_add_formsubmission_verbose_name_plural.py similarity index 100% rename from wagtail/tests/testapp/migrations/0045_add_formsubmission_verbose_name_plural.py rename to wagtail/test/testapp/migrations/0045_add_formsubmission_verbose_name_plural.py diff --git a/wagtail/tests/testapp/migrations/0046_personpage.py b/wagtail/test/testapp/migrations/0046_personpage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0046_personpage.py rename to wagtail/test/testapp/migrations/0046_personpage.py diff --git a/wagtail/tests/testapp/migrations/0047_restaurant_tags.py b/wagtail/test/testapp/migrations/0047_restaurant_tags.py similarity index 100% rename from wagtail/tests/testapp/migrations/0047_restaurant_tags.py rename to wagtail/test/testapp/migrations/0047_restaurant_tags.py diff --git a/wagtail/tests/testapp/migrations/0048_importantpages.py b/wagtail/test/testapp/migrations/0048_importantpages.py similarity index 100% rename from wagtail/tests/testapp/migrations/0048_importantpages.py rename to wagtail/test/testapp/migrations/0048_importantpages.py diff --git a/wagtail/tests/testapp/migrations/0049_rawhtmlblock.py b/wagtail/test/testapp/migrations/0049_rawhtmlblock.py similarity index 89% rename from wagtail/tests/testapp/migrations/0049_rawhtmlblock.py rename to wagtail/test/testapp/migrations/0049_rawhtmlblock.py index d1ba45941c..acf6416b35 100644 --- a/wagtail/tests/testapp/migrations/0049_rawhtmlblock.py +++ b/wagtail/test/testapp/migrations/0049_rawhtmlblock.py @@ -3,7 +3,7 @@ from django.db import migrations import wagtail.core.blocks import wagtail.core.fields -import wagtail.tests.testapp.models +import wagtail.test.testapp.models class Migration(migrations.Migration): @@ -20,7 +20,7 @@ class Migration(migrations.Migration): [ ("text", wagtail.core.blocks.CharBlock()), ("rich_text", wagtail.core.blocks.RichTextBlock()), - ("image", wagtail.tests.testapp.models.ExtendedImageChooserBlock()), + ("image", wagtail.test.testapp.models.ExtendedImageChooserBlock()), ( "product", wagtail.core.blocks.StructBlock( diff --git a/wagtail/tests/testapp/migrations/0050_customimagewithauthor_customrenditionwithauthor.py b/wagtail/test/testapp/migrations/0050_customimagewithauthor_customrenditionwithauthor.py similarity index 100% rename from wagtail/tests/testapp/migrations/0050_customimagewithauthor_customrenditionwithauthor.py rename to wagtail/test/testapp/migrations/0050_customimagewithauthor_customrenditionwithauthor.py diff --git a/wagtail/tests/testapp/migrations/0051_tag_verbose_name.py b/wagtail/test/testapp/migrations/0051_tag_verbose_name.py similarity index 100% rename from wagtail/tests/testapp/migrations/0051_tag_verbose_name.py rename to wagtail/test/testapp/migrations/0051_tag_verbose_name.py diff --git a/wagtail/tests/testapp/migrations/0052_custom_doc_image_unique_together.py b/wagtail/test/testapp/migrations/0052_custom_doc_image_unique_together.py similarity index 100% rename from wagtail/tests/testapp/migrations/0052_custom_doc_image_unique_together.py rename to wagtail/test/testapp/migrations/0052_custom_doc_image_unique_together.py diff --git a/wagtail/tests/testapp/migrations/0053_formfield_clean_name.py b/wagtail/test/testapp/migrations/0053_formfield_clean_name.py similarity index 100% rename from wagtail/tests/testapp/migrations/0053_formfield_clean_name.py rename to wagtail/test/testapp/migrations/0053_formfield_clean_name.py diff --git a/wagtail/tests/testapp/migrations/0054_simpletask.py b/wagtail/test/testapp/migrations/0054_simpletask.py similarity index 100% rename from wagtail/tests/testapp/migrations/0054_simpletask.py rename to wagtail/test/testapp/migrations/0054_simpletask.py diff --git a/wagtail/tests/testapp/migrations/0055_eventpage_childobject_i18n.py b/wagtail/test/testapp/migrations/0055_eventpage_childobject_i18n.py similarity index 100% rename from wagtail/tests/testapp/migrations/0055_eventpage_childobject_i18n.py rename to wagtail/test/testapp/migrations/0055_eventpage_childobject_i18n.py diff --git a/wagtail/tests/testapp/migrations/0056_streampage_nested_streamblock.py b/wagtail/test/testapp/migrations/0056_streampage_nested_streamblock.py similarity index 92% rename from wagtail/tests/testapp/migrations/0056_streampage_nested_streamblock.py rename to wagtail/test/testapp/migrations/0056_streampage_nested_streamblock.py index 7fc6907697..d6ebb35f64 100644 --- a/wagtail/tests/testapp/migrations/0056_streampage_nested_streamblock.py +++ b/wagtail/test/testapp/migrations/0056_streampage_nested_streamblock.py @@ -3,7 +3,7 @@ from django.db import migrations import wagtail.core.blocks import wagtail.core.fields -import wagtail.tests.testapp.models +import wagtail.test.testapp.models class Migration(migrations.Migration): @@ -20,7 +20,7 @@ class Migration(migrations.Migration): [ ("text", wagtail.core.blocks.CharBlock()), ("rich_text", wagtail.core.blocks.RichTextBlock()), - ("image", wagtail.tests.testapp.models.ExtendedImageChooserBlock()), + ("image", wagtail.test.testapp.models.ExtendedImageChooserBlock()), ( "product", wagtail.core.blocks.StructBlock( diff --git a/wagtail/tests/testapp/migrations/0057_customdocumentwithauthor.py b/wagtail/test/testapp/migrations/0057_customdocumentwithauthor.py similarity index 100% rename from wagtail/tests/testapp/migrations/0057_customdocumentwithauthor.py rename to wagtail/test/testapp/migrations/0057_customdocumentwithauthor.py diff --git a/wagtail/tests/testapp/migrations/0058_blockcountsstreammodel_minmaxcountstreammodel.py b/wagtail/test/testapp/migrations/0058_blockcountsstreammodel_minmaxcountstreammodel.py similarity index 100% rename from wagtail/tests/testapp/migrations/0058_blockcountsstreammodel_minmaxcountstreammodel.py rename to wagtail/test/testapp/migrations/0058_blockcountsstreammodel_minmaxcountstreammodel.py diff --git a/wagtail/tests/testapp/migrations/0059_deadlystreampage.py b/wagtail/test/testapp/migrations/0059_deadlystreampage.py similarity index 90% rename from wagtail/tests/testapp/migrations/0059_deadlystreampage.py rename to wagtail/test/testapp/migrations/0059_deadlystreampage.py index 51fdb4bb8b..cc8978ac8d 100644 --- a/wagtail/tests/testapp/migrations/0059_deadlystreampage.py +++ b/wagtail/test/testapp/migrations/0059_deadlystreampage.py @@ -3,7 +3,7 @@ from django.db import migrations, models import django.db.models.deletion import wagtail.core.fields -import wagtail.tests.testapp.models +import wagtail.test.testapp.models class Migration(migrations.Migration): @@ -31,7 +31,7 @@ class Migration(migrations.Migration): ( "body", wagtail.core.fields.StreamField( - [("title", wagtail.tests.testapp.models.DeadlyCharBlock())] + [("title", wagtail.test.testapp.models.DeadlyCharBlock())] ), ), ], diff --git a/wagtail/tests/testapp/migrations/0060_taggedchildpage_taggedgrandchildpage.py b/wagtail/test/testapp/migrations/0060_taggedchildpage_taggedgrandchildpage.py similarity index 100% rename from wagtail/tests/testapp/migrations/0060_taggedchildpage_taggedgrandchildpage.py rename to wagtail/test/testapp/migrations/0060_taggedchildpage_taggedgrandchildpage.py diff --git a/wagtail/tests/testapp/migrations/0061_tag_fk_for_django_4.py b/wagtail/test/testapp/migrations/0061_tag_fk_for_django_4.py similarity index 100% rename from wagtail/tests/testapp/migrations/0061_tag_fk_for_django_4.py rename to wagtail/test/testapp/migrations/0061_tag_fk_for_django_4.py diff --git a/wagtail/tests/testapp/migrations/__init__.py b/wagtail/test/testapp/migrations/__init__.py similarity index 100% rename from wagtail/tests/testapp/migrations/__init__.py rename to wagtail/test/testapp/migrations/__init__.py diff --git a/wagtail/tests/testapp/models.py b/wagtail/test/testapp/models.py similarity index 100% rename from wagtail/tests/testapp/models.py rename to wagtail/test/testapp/models.py diff --git a/wagtail/tests/testapp/rich_text.py b/wagtail/test/testapp/rich_text.py similarity index 100% rename from wagtail/tests/testapp/rich_text.py rename to wagtail/test/testapp/rich_text.py diff --git a/wagtail/tests/testapp/templates/tests/base.html b/wagtail/test/testapp/templates/tests/base.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/base.html rename to wagtail/test/testapp/templates/tests/base.html diff --git a/wagtail/tests/testapp/templates/tests/block_forms/link_block.html b/wagtail/test/testapp/templates/tests/block_forms/link_block.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/block_forms/link_block.html rename to wagtail/test/testapp/templates/tests/block_forms/link_block.html diff --git a/wagtail/tests/testapp/templates/tests/block_forms/struct_block_form_template.html b/wagtail/test/testapp/templates/tests/block_forms/struct_block_form_template.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/block_forms/struct_block_form_template.html rename to wagtail/test/testapp/templates/tests/block_forms/struct_block_form_template.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/heading_block.html b/wagtail/test/testapp/templates/tests/blocks/heading_block.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/heading_block.html rename to wagtail/test/testapp/templates/tests/blocks/heading_block.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/include_block_autoescape_off_test.html b/wagtail/test/testapp/templates/tests/blocks/include_block_autoescape_off_test.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/include_block_autoescape_off_test.html rename to wagtail/test/testapp/templates/tests/blocks/include_block_autoescape_off_test.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/include_block_only_test.html b/wagtail/test/testapp/templates/tests/blocks/include_block_only_test.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/include_block_only_test.html rename to wagtail/test/testapp/templates/tests/blocks/include_block_only_test.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/include_block_test.html b/wagtail/test/testapp/templates/tests/blocks/include_block_test.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/include_block_test.html rename to wagtail/test/testapp/templates/tests/blocks/include_block_test.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/include_block_test_with_filter.html b/wagtail/test/testapp/templates/tests/blocks/include_block_test_with_filter.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/include_block_test_with_filter.html rename to wagtail/test/testapp/templates/tests/blocks/include_block_test_with_filter.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/include_block_with_test.html b/wagtail/test/testapp/templates/tests/blocks/include_block_with_test.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/include_block_with_test.html rename to wagtail/test/testapp/templates/tests/blocks/include_block_with_test.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/link_block.html b/wagtail/test/testapp/templates/tests/blocks/link_block.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/link_block.html rename to wagtail/test/testapp/templates/tests/blocks/link_block.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/posts_static_block.html b/wagtail/test/testapp/templates/tests/blocks/posts_static_block.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/posts_static_block.html rename to wagtail/test/testapp/templates/tests/blocks/posts_static_block.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/section_block.html b/wagtail/test/testapp/templates/tests/blocks/section_block.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/section_block.html rename to wagtail/test/testapp/templates/tests/blocks/section_block.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/stream_with_language.html b/wagtail/test/testapp/templates/tests/blocks/stream_with_language.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/stream_with_language.html rename to wagtail/test/testapp/templates/tests/blocks/stream_with_language.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/struct_block_custom_value.html b/wagtail/test/testapp/templates/tests/blocks/struct_block_custom_value.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/struct_block_custom_value.html rename to wagtail/test/testapp/templates/tests/blocks/struct_block_custom_value.html diff --git a/wagtail/tests/testapp/templates/tests/blocks/table_block_with_caption.html b/wagtail/test/testapp/templates/tests/blocks/table_block_with_caption.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/blocks/table_block_with_caption.html rename to wagtail/test/testapp/templates/tests/blocks/table_block_with_caption.html diff --git a/wagtail/tests/testapp/templates/tests/business_child.html b/wagtail/test/testapp/templates/tests/business_child.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/business_child.html rename to wagtail/test/testapp/templates/tests/business_child.html diff --git a/wagtail/tests/testapp/templates/tests/event_index.html b/wagtail/test/testapp/templates/tests/event_index.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/event_index.html rename to wagtail/test/testapp/templates/tests/event_index.html diff --git a/wagtail/tests/testapp/templates/tests/event_page.html b/wagtail/test/testapp/templates/tests/event_page.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/event_page.html rename to wagtail/test/testapp/templates/tests/event_page.html diff --git a/wagtail/tests/testapp/templates/tests/event_page_password_required.html b/wagtail/test/testapp/templates/tests/event_page_password_required.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/event_page_password_required.html rename to wagtail/test/testapp/templates/tests/event_page_password_required.html diff --git a/wagtail/tests/testapp/templates/tests/form_page.html b/wagtail/test/testapp/templates/tests/form_page.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/form_page.html rename to wagtail/test/testapp/templates/tests/form_page.html diff --git a/wagtail/tests/testapp/templates/tests/form_page_landing.html b/wagtail/test/testapp/templates/tests/form_page_landing.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/form_page_landing.html rename to wagtail/test/testapp/templates/tests/form_page_landing.html diff --git a/wagtail/tests/testapp/templates/tests/form_page_with_custom_form_builder.html b/wagtail/test/testapp/templates/tests/form_page_with_custom_form_builder.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/form_page_with_custom_form_builder.html rename to wagtail/test/testapp/templates/tests/form_page_with_custom_form_builder.html diff --git a/wagtail/tests/testapp/templates/tests/form_page_with_custom_form_builder_landing.html b/wagtail/test/testapp/templates/tests/form_page_with_custom_form_builder_landing.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/form_page_with_custom_form_builder_landing.html rename to wagtail/test/testapp/templates/tests/form_page_with_custom_form_builder_landing.html diff --git a/wagtail/tests/testapp/templates/tests/form_page_with_custom_submission.html b/wagtail/test/testapp/templates/tests/form_page_with_custom_submission.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/form_page_with_custom_submission.html rename to wagtail/test/testapp/templates/tests/form_page_with_custom_submission.html diff --git a/wagtail/tests/testapp/templates/tests/form_page_with_custom_submission_landing.html b/wagtail/test/testapp/templates/tests/form_page_with_custom_submission_landing.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/form_page_with_custom_submission_landing.html rename to wagtail/test/testapp/templates/tests/form_page_with_custom_submission_landing.html diff --git a/wagtail/tests/testapp/templates/tests/form_page_with_redirect.html b/wagtail/test/testapp/templates/tests/form_page_with_redirect.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/form_page_with_redirect.html rename to wagtail/test/testapp/templates/tests/form_page_with_redirect.html diff --git a/wagtail/tests/testapp/templates/tests/form_page_with_redirect_landing.html b/wagtail/test/testapp/templates/tests/form_page_with_redirect_landing.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/form_page_with_redirect_landing.html rename to wagtail/test/testapp/templates/tests/form_page_with_redirect_landing.html diff --git a/wagtail/tests/testapp/templates/tests/includes/event_listing.html b/wagtail/test/testapp/templates/tests/includes/event_listing.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/includes/event_listing.html rename to wagtail/test/testapp/templates/tests/includes/event_listing.html diff --git a/wagtail/tests/testapp/templates/tests/simple_page.html b/wagtail/test/testapp/templates/tests/simple_page.html similarity index 100% rename from wagtail/tests/testapp/templates/tests/simple_page.html rename to wagtail/test/testapp/templates/tests/simple_page.html diff --git a/wagtail/tests/testapp/urls.py b/wagtail/test/testapp/urls.py similarity index 73% rename from wagtail/tests/testapp/urls.py rename to wagtail/test/testapp/urls.py index 468b4064ba..5bd7e4e0e1 100644 --- a/wagtail/tests/testapp/urls.py +++ b/wagtail/test/testapp/urls.py @@ -1,6 +1,6 @@ from django.urls import path -from wagtail.tests.testapp.views import bob_only_zone, message_test +from wagtail.test.testapp.views import bob_only_zone, message_test urlpatterns = [ path("bob-only-zone", bob_only_zone, name="testapp_bob_only_zone"), diff --git a/wagtail/tests/testapp/views.py b/wagtail/test/testapp/views.py similarity index 100% rename from wagtail/tests/testapp/views.py rename to wagtail/test/testapp/views.py diff --git a/wagtail/tests/testapp/wagtail_hooks.py b/wagtail/test/testapp/wagtail_hooks.py similarity index 100% rename from wagtail/tests/testapp/wagtail_hooks.py rename to wagtail/test/testapp/wagtail_hooks.py diff --git a/wagtail/tests/urls.py b/wagtail/test/urls.py similarity index 95% rename from wagtail/tests/urls.py rename to wagtail/test/urls.py index 722b24ada6..671550c80e 100644 --- a/wagtail/tests/urls.py +++ b/wagtail/test/urls.py @@ -15,8 +15,8 @@ from wagtail.documents.api.v2.views import DocumentsAPIViewSet from wagtail.images import urls as wagtailimages_urls from wagtail.images.api.v2.views import ImagesAPIViewSet from wagtail.images.tests import urls as wagtailimages_test_urls -from wagtail.tests.testapp import urls as testapp_urls -from wagtail.tests.testapp.models import EventSitemap +from wagtail.test.testapp import urls as testapp_urls +from wagtail.test.testapp.models import EventSitemap api_router = WagtailAPIRouter("wagtailapi_v2") api_router.register_endpoint("pages", PagesAPIViewSet) diff --git a/wagtail/tests/urls_multilang.py b/wagtail/test/urls_multilang.py similarity index 100% rename from wagtail/tests/urls_multilang.py rename to wagtail/test/urls_multilang.py diff --git a/wagtail/tests/utils/__init__.py b/wagtail/test/utils/__init__.py similarity index 100% rename from wagtail/tests/utils/__init__.py rename to wagtail/test/utils/__init__.py diff --git a/wagtail/tests/utils/form_data.py b/wagtail/test/utils/form_data.py similarity index 98% rename from wagtail/tests/utils/form_data.py rename to wagtail/test/utils/form_data.py index a4554c678a..03aef4927b 100644 --- a/wagtail/tests/utils/form_data.py +++ b/wagtail/test/utils/form_data.py @@ -2,7 +2,7 @@ The ``assertCanCreate`` method requires page data to be passed in the same format that the page edit form would submit. For complex page types, it can be difficult to construct this data structure by hand; -the ``wagtail.tests.utils.form_data`` module provides a set of helper +the ``wagtail.test.utils.form_data`` module provides a set of helper functions to assist with this. """ diff --git a/wagtail/tests/utils/page_tests.py b/wagtail/test/utils/page_tests.py similarity index 100% rename from wagtail/tests/utils/page_tests.py rename to wagtail/test/utils/page_tests.py diff --git a/wagtail/tests/utils/wagtail_tests.py b/wagtail/test/utils/wagtail_tests.py similarity index 100% rename from wagtail/tests/utils/wagtail_tests.py rename to wagtail/test/utils/wagtail_tests.py diff --git a/wagtail/tests/demosite/__init__.py b/wagtail/tests/demosite/__init__.py deleted file mode 100644 index 8a85200dda..0000000000 --- a/wagtail/tests/demosite/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "wagtail.tests.demosite.apps.DemositeAppConfig" diff --git a/wagtail/tests/i18n/__init__.py b/wagtail/tests/i18n/__init__.py deleted file mode 100644 index 145f251b35..0000000000 --- a/wagtail/tests/i18n/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "wagtail.tests.i18n.apps.I18nAppConfig" diff --git a/wagtail/tests/modeladmintest/__init__.py b/wagtail/tests/modeladmintest/__init__.py deleted file mode 100644 index 69347ed942..0000000000 --- a/wagtail/tests/modeladmintest/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "wagtail.tests.modeladmintest.apps.WagtailTestsAppConfig" diff --git a/wagtail/tests/routablepage/__init__.py b/wagtail/tests/routablepage/__init__.py deleted file mode 100644 index 152e8c476d..0000000000 --- a/wagtail/tests/routablepage/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "wagtail.tests.routablepage.apps.WagtailRoutablePageTestsAppConfig" diff --git a/wagtail/tests/search/__init__.py b/wagtail/tests/search/__init__.py deleted file mode 100644 index 38955008b5..0000000000 --- a/wagtail/tests/search/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "wagtail.tests.search.apps.WagtailSearchTestsAppConfig" diff --git a/wagtail/tests/snippets/__init__.py b/wagtail/tests/snippets/__init__.py deleted file mode 100644 index ab89861a4d..0000000000 --- a/wagtail/tests/snippets/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "wagtail.tests.snippets.apps.WagtailSnippetsTestsAppConfig" diff --git a/wagtail/tests/testapp/__init__.py b/wagtail/tests/testapp/__init__.py deleted file mode 100644 index fe91bc78a3..0000000000 --- a/wagtail/tests/testapp/__init__.py +++ /dev/null @@ -1 +0,0 @@ -default_app_config = "wagtail.tests.testapp.apps.WagtailTestsAppConfig" diff --git a/wagtail/users/tests/test_admin_views.py b/wagtail/users/tests/test_admin_views.py index b35bcb18b5..46c6286d9e 100644 --- a/wagtail/users/tests/test_admin_views.py +++ b/wagtail/users/tests/test_admin_views.py @@ -21,7 +21,7 @@ from wagtail.core.models import ( GroupPagePermission, Page, ) -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from wagtail.users.forms import UserCreationForm, UserEditForm from wagtail.users.models import UserProfile from wagtail.users.views.groups import GroupViewSet diff --git a/wagtail/users/tests/test_bulk_actions/test_bulk_assign_role.py b/wagtail/users/tests/test_bulk_actions/test_bulk_assign_role.py index ff8437a026..9ba1c20cbc 100644 --- a/wagtail/users/tests/test_bulk_actions/test_bulk_assign_role.py +++ b/wagtail/users/tests/test_bulk_actions/test_bulk_assign_role.py @@ -4,7 +4,7 @@ from django.http import HttpRequest, HttpResponse from django.test import TestCase from django.urls import reverse -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from wagtail.users.views.bulk_actions.user_bulk_action import UserBulkAction User = get_user_model() diff --git a/wagtail/users/tests/test_bulk_actions/test_bulk_delete.py b/wagtail/users/tests/test_bulk_actions/test_bulk_delete.py index 7636056741..38cfc1ca03 100644 --- a/wagtail/users/tests/test_bulk_actions/test_bulk_delete.py +++ b/wagtail/users/tests/test_bulk_actions/test_bulk_delete.py @@ -3,7 +3,7 @@ from django.http import HttpRequest, HttpResponse from django.test import TestCase from django.urls import reverse -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from wagtail.users.views.bulk_actions.user_bulk_action import UserBulkAction User = get_user_model() diff --git a/wagtail/users/tests/test_bulk_actions/test_bulk_set_active_state.py b/wagtail/users/tests/test_bulk_actions/test_bulk_set_active_state.py index fc94caef1a..159926b93e 100644 --- a/wagtail/users/tests/test_bulk_actions/test_bulk_set_active_state.py +++ b/wagtail/users/tests/test_bulk_actions/test_bulk_set_active_state.py @@ -3,7 +3,7 @@ from django.http import HttpRequest, HttpResponse from django.test import TestCase from django.urls import reverse -from wagtail.tests.utils import WagtailTestUtils +from wagtail.test.utils import WagtailTestUtils from wagtail.users.views.bulk_actions.user_bulk_action import UserBulkAction User = get_user_model()