django-model-utils/tests
Benedikt Willi f09ea0e472 Fix compatibility issues with django-modeltranslation by modifying manager mixins
- Added a new class `_GenericMixin` to serve as a runtime placeholder for `Generic[ModelT]`. This change prevents `TypeError` during `__class__` assignments, which was an issue when mixins inherited from `Generic[T]` at runtime.
- All manager mixins have been updated to inherit from `_GenericMixin` instead of `Generic[ModelT]`. This ensures compatibility with `django-modeltranslation`.
- Introduced regressions tests to confirm that the manager instances support `__class__` reassignment without issues. Tests were added for `SoftDeletableManager`, `InheritanceManager`, `QueryManager`, and `JoinManager`.

Closes GH-#636.
2025-12-15 11:38:33 +01:00
..
test_fields Model.save keyword only 2025-04-08 09:55:41 +02:00
test_managers Fix compatibility issues with django-modeltranslation by modifying manager mixins 2025-12-15 11:38:33 +01:00
test_models chore: Replicate Django's signature at SoftDelete queryset 2024-08-28 10:41:31 -03:00
__init__.py Exclude tests from distribution 2017-02-15 23:00:10 +00:00
fields.py Annotate test helpers 2024-06-13 12:02:05 +02:00
models.py Fixed an infinite recursion bug when deleting models related to a tracked model with a ForeignKey (#620) 2025-04-03 19:58:57 +02:00
settings.py Make default port a string 2024-04-05 17:15:16 +02:00
test_choices.py Annotate the test_choices module 2024-06-13 12:02:05 +02:00
test_inheritance_iterable.py Annotate return type of test methods 2024-06-13 12:02:05 +02:00
test_miscellaneous.py Annotate return type of test methods 2024-06-13 12:02:05 +02:00