-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Description
Description
Testing against the main branch of Django reveals that the django.test.testcases.TestCase
will change with Django 5.2. To remove an asymmetry between TransactionTestCase
and TestCase
fixture loading is changed. _fixture_setup()
is turned from a method into a classmethod and loaded with setUpClass()
(an not with setUp()
).
This breaks cms.test_utils.testcases.BaseTestCase
which from _fixture_setup()
calls the method self.create_fixture
. For BaseTestCase
this is an empty method but packages and projects might depend on it.
Steps to reproduce
Github actions fail, e.g., https://github.com/django-cms/django-cms/actions/runs/10963469778/job/30445027467 **You have to manually open the "Test with Django test runner" to see the failure, since this action is set up to never fail. E.g.:
Creating test database for alias 'default'...
Found 1147 test(s).
System check identified no issues (0 silenced).
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEE.....Wizard for model <class 'cms.models.pagemodel.Page'> has already been registered
Wizard for model <class 'cms.models.pagemodel.Page'> has already been registered
Model <class 'cms.models.contentmodels.PageContent'> already registered for frontend rendering
Wizard for model <class 'cms.test_utils.project.sampleapp.models.Category'> has already been registered
Model <class 'cms.test_utils.project.placeholderapp.models.Example1'> already registered for frontend rendering
All checks passed!
......EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEE.EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEsEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE...
Additional information (CMS/Python/Django versions)
- All django CMS versions to date
- Fixed #35660 -- Provided fixtures during setUpClass phase of TransactionTestCase. django/django#18514
- https://forum.djangoproject.com/t/making-fixtures-available-in-setupclass-phase-of-transactiontestcase/34386
Do you want to help fix this issue?
Potentially, it makes sense to load the fixtures in the setUp()
method. I have not looked deep enough into django test cases to judge.
- Yes, I want to help fix this issue and I will join the channel #pr-reviews on the Discord Server to confirm with the community that a PR is welcome.
- No, I only want to report the issue.