Closed mbi closed 1 year ago
Hi @mbi ! Thanks for this PR! Can you add a set of test requirements that let tests run on 4.0 in tests/requirements/dj40_cms311.txt
? It'll be great to add those requirements to https://github.com/django-cms/djangocms-transfer/blob/edbc9c7da5629bc7f5bd2a5f84c89d528d41da71/.github/workflows/test.yml#L10-L18 (and remove python 3.6 and 3.7 from the python list).
Merging #27 (6f20021) into master (edbc9c7) will not change coverage. The diff coverage is
66.66%
.:exclamation: Current head 6f20021 differs from pull request most recent head 0d77959. Consider uploading reports for the commit 0d77959 to get more accurate results
@@ Coverage Diff @@
## master #27 +/- ##
=======================================
Coverage 32.19% 32.19%
=======================================
Files 11 11
Lines 382 382
Branches 63 56 -7
=======================================
Hits 123 123
Misses 259 259
Impacted Files | Coverage Δ | |
---|---|---|
djangocms_transfer/datastructures.py | 51.51% <66.66%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
@fsbraun sigh this is quite the rabbit hole:
test_for_missing_migrations
test_for_missing_migrations
fails because it thinks all the id fields (for cms
and menus
) have changed. DEFAULT_AUTO_FIELD
in the test settings, right? Well, enter django-app-helper and the odd way of defining test settings using HELPER_SETTINGS
. Turns out DEFAULT_AUTO_FIELD is forced to be django.db.models.BigAutoField
at the end of the configuration process. I found no way of overriding it, either from within HELPER_SETTINGS
nor by overriding it in the test itself.So my last commit is kind of a hack: it limits the makemigrations
command in test_for_missing_migrations
to only consider missing migrations in djangocms_transfer
itself. (why would it consider missing migrations in other apps?) although djangocms_transfer
has no migrations of its own. But the tests pass with Django 3.0 / CMS 3.8 through Django 4.1 / CMS 3.11
Frankly, @mbi , I have done the same: limit the test to the package in question.
Description
djangocms_transfer/datastructures.py imports
force_text
, which was deprecated years ago and removed in Django 4.0This PR simply replaces
force_text
with the newforce_str
Checklist
master