10000 [BUG] Django 5.2 will break `CMSBaseTestCase` · Issue #8006 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content
[BUG] Django 5.2 will break CMSBaseTestCase #8006
Closed
@fsbraun

Description

@fsbraun

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)

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0