mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
remove deprecated wagtail.tests modules
This commit is contained in:
parent
3faa5c51c6
commit
2a6c4c6e1c
@ -1,12 +0,0 @@
|
||||
from warnings import warn
|
||||
|
||||
from wagtail.test.dummy_external_storage import * # noqa
|
||||
from wagtail.utils.deprecation import RemovedInWagtail50Warning
|
||||
|
||||
warn(
|
||||
"Importing from wagtail.tests.dummy_external_storage is deprecated. "
|
||||
"Use wagtail.test.dummy_external_storage instead. "
|
||||
"See https://docs.wagtail.org/en/stable/releases/3.0.html#changes-to-module-paths",
|
||||
category=RemovedInWagtail50Warning,
|
||||
stacklevel=2,
|
||||
)
|
@ -1,12 +0,0 @@
|
||||
from warnings import warn
|
||||
|
||||
from wagtail.test.settings import * # noqa
|
||||
from wagtail.utils.deprecation import RemovedInWagtail50Warning
|
||||
|
||||
warn(
|
||||
"Importing from wagtail.tests.settings is deprecated. "
|
||||
"Use wagtail.test.settings instead. "
|
||||
"See https://docs.wagtail.org/en/stable/releases/3.0.html#changes-to-module-paths",
|
||||
category=RemovedInWagtail50Warning,
|
||||
stacklevel=2,
|
||||
)
|
12
wagtail/tests/utils.py
Normal file
12
wagtail/tests/utils.py
Normal file
@ -0,0 +1,12 @@
|
||||
from warnings import warn
|
||||
|
||||
from wagtail.test.utils import * # noqa
|
||||
from wagtail.utils.deprecation import RemovedInWagtail60Warning
|
||||
|
||||
warn(
|
||||
"Importing from wagtail.tests.utils is deprecated. "
|
||||
"Use wagtail.test.utils instead. "
|
||||
"See https://docs.wagtail.org/en/stable/releases/3.0.html#changes-to-module-paths",
|
||||
category=RemovedInWagtail60Warning,
|
||||
stacklevel=2,
|
||||
)
|
@ -1,11 +0,0 @@
|
||||
from wagtail.test.utils import * # noqa
|
||||
|
||||
# RemovedInWagtail50Warning: We would put a deprecation warning here to tell people to import from
|
||||
# wagtail.test.utils instead, but then the unittest framework would trigger the warning when
|
||||
# recursing through this module during test discovery, and there seems to be no good way to block
|
||||
# recursing into wagtail.test.utils without also blocking the real tests in wagtail.test.
|
||||
|
||||
# Instead, when wagtail/test/utils/(form_data|page_tests|wagtail_tests).py are removed in Wagtail
|
||||
# 5.0, we will move this file to wagtail/test/utils.py. Since this does not match the standard
|
||||
# test_*.py pattern for test modules, unittest will no longer try to import it, and then we can
|
||||
# add a RemovedInWagtail60Warning to finally prompt people to update their imports.
|
@ -1,12 +0,0 @@
|
||||
from warnings import warn
|
||||
|
||||
from wagtail.test.utils.form_data import * # noqa
|
||||
from wagtail.utils.deprecation import RemovedInWagtail50Warning
|
||||
|
||||
warn(
|
||||
"Importing from wagtail.tests.utils.form_data is deprecated. "
|
||||
"Use wagtail.test.utils.form_data instead. "
|
||||
"See https://docs.wagtail.org/en/stable/releases/3.0.html#changes-to-module-paths",
|
||||
category=RemovedInWagtail50Warning,
|
||||
stacklevel=2,
|
||||
)
|
@ -1,12 +0,0 @@
|
||||
from warnings import warn
|
||||
|
||||
from wagtail.test.utils.page_tests import * # noqa
|
||||
from wagtail.utils.deprecation import RemovedInWagtail50Warning
|
||||
|
||||
warn(
|
||||
"Importing from wagtail.tests.utils.page_tests is deprecated. "
|
||||
"Use wagtail.test.utils.page_tests instead. "
|
||||
"See https://docs.wagtail.org/en/stable/releases/3.0.html#changes-to-module-paths",
|
||||
category=RemovedInWagtail50Warning,
|
||||
stacklevel=2,
|
||||
)
|
@ -1,12 +0,0 @@
|
||||
from warnings import warn
|
||||
|
||||
from wagtail.test.utils.wagtail_tests import * # noqa
|
||||
from wagtail.utils.deprecation import RemovedInWagtail50Warning
|
||||
|
||||
warn(
|
||||
"Importing from wagtail.tests.utils.wagtail_tests is deprecated. "
|
||||
"Use wagtail.test.utils.wagtail_tests instead. "
|
||||
"See https://docs.wagtail.org/en/stable/releases/3.0.html#changes-to-module-paths",
|
||||
category=RemovedInWagtail50Warning,
|
||||
stacklevel=2,
|
||||
)
|
Loading…
Reference in New Issue
Block a user