mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Fix and re-enable AbstractModelTrackerTests
There used to be a [bug in Django](https://code.djangoproject.com/ticket/30427) that caused these tests to fail, according to the discussion of #370. That bug was fixed in Django 4.0. However, because the test model was using a `FieldTracker` rather than a `ModelTracker`, all model-specific test cases in `ModelTrackerTests` continued to fail.
This commit is contained in:
parent
324ea2bd25
commit
a6b0a2aff7
2 changed files with 1 additions and 4 deletions
|
|
@ -249,7 +249,7 @@ class TrackedAbstract(AbstractTracked):
|
|||
number = models.IntegerField()
|
||||
mutable = MutableField(default=None)
|
||||
|
||||
tracker = FieldTracker()
|
||||
tracker = ModelTracker()
|
||||
|
||||
|
||||
class TrackedNotDefault(models.Model):
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from unittest import skip
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.core.exceptions import FieldError
|
||||
from django.db import models
|
||||
|
|
@ -877,7 +875,6 @@ class InheritedModelTrackerTests(ModelTrackerTests):
|
|||
self.assertTrue(self.tracker.has_changed('name2'))
|
||||
|
||||
|
||||
@skip("has known failures")
|
||||
class AbstractModelTrackerTests(ModelTrackerTests):
|
||||
|
||||
tracked_class = TrackedAbstract
|
||||
|
|
|
|||
Loading…
Reference in a new issue