10000 chore: Django 5.2-compatible test fixtures by fsbraun · Pull Request #8008 · django-cms/django-cms · GitHub
[go: up one dir, main page]

Skip to content

chore: Django 5.2-compatible test fixtures #8008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 23, 2024

Conversation

fsbraun
Copy link
Member
@fsbraun fsbraun commented Sep 21, 2024

Description

This PR fixes the CMSBaseTestCase to stay compatible with Django 5.2. (Fixes #8006 )

Fixtures were loaded in _fixture_setup() which will turn into a classmethod in Django 5.2. Since the CMSBaseTestCase API expects the fixtures to be in a regular method, they are now loaded in _pre_setup().

Related resources

Checklist

  • I have opened this pull request against develop-4
  • I have added or modified the tests when changing logic
  • I have followed the conventional commits guidelines to add meaningful information into the changelog
  • I have read the contribution guidelines and I have joined the channel #pr-reviews on our Discord Server to find a “pr review buddy” who is going to review my pull request.

@fsbraun fsbraun requested a review from marksweb September 21, 2024 05:36
@fsbraun fsbraun changed the title chore: Re-hook fixture loading to stay compatible with django 5.2 chore: Django 5.2-compatible test fixtures Sep 22, 2024
@marksweb
Copy link
Member
marksweb commented Sep 22, 2024

This looks like it fixes those failing tests that I hadn't worked out a fix for yet in my PR 👏

@fsbraun fsbraun merged commit 4e1fb8d into django-cms:develop-4 Sep 23, 2024
42 checks passed
fsbraun added a commit that referenced this pull request Sep 23, 2024
* chore: Re-hook fixture loading to stay compatible with django 5.2

* Remove Postgres pin to v12 for testing

* Exclude Py39 from dj51

* Pin postgres to version 15

* Switch from psycopg2 to recommended psycopg>=3.1.8

---------

Co-authored-by: Github Release Action <info@django-cms.org>
@fsbraun fsbraun mentioned this pull request Sep 30, 2024
4 tasks
fsbraun added a commit that referenced this pull request Oct 7, 2024
* [4.1.3 release process] Building locales

* [4.1.3 release process] Bumped version to 4.1.3

* [4.1.3 release process] compilemessages

* [4.1.3 release process] compiling new static files

* [4.1.3 release process] updating latest docs

* Update CHANGELOG.rst

* Update 4.1.3.rst

* Update 4.1.3.rst

* chore: Django 5.2-compatible test fixtures (#8008)

* chore: Re-hook fixture loading to stay compatible with django 5.2

* Remove Postgres pin to v12 for testing

* Exclude Py39 from dj51

* Pin postgres to version 15

* Switch from psycopg2 to recommended psycopg>=3.1.8

---------

Co-authored-by: Github Release Action <info@django-cms.org>

* Update CHANGELOG.rst typo

* chore: Backport #8021

* fix: Update databases.txt to include psycopg2 for Django < 4.2

* fix: Mark language and user middleware synchronous for ASGI (Backport of #7986)

---------

Co-authored-by: Github Release Action <info@django-cms.org>
@fsbraun fsbraun deleted the chore/fix-fixtures branch January 10, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Django 5.2 will break CMSBaseTestCase
2 participants
0