2020 HistoricalState , HistoricalCustomFKError , Series , SeriesWork , PollInfo ,
2121 UserAccessorDefault , UserAccessorOverride , Employee , Country , Province ,
2222 City , Contact , ContactRegister ,
23- TrackedAbstractBaseA , TrackedAbstractBaseB , UntrackedAbstractBase ,
24- TrackedConcreteBase , UntrackedConcreteBase ,
23+ TrackedAbstractBaseA , TrackedAbstractBaseB ,
24+ TrackedWithAbstractBase , TrackedWithConcreteBase ,
25+ TrackedWithTrackedAbstractAndUntrackedConcreteBase ,
26+ TrackedWithIndirectTrackedAbstractBase ,
27+ TrackedWithIndirectTrackedConcreteBase ,
28+ TrackedWithAbstractBaseToRegister ,
2529)
2630from ..external .models import ExternalModel2 , ExternalModel4
2731
@@ -786,18 +790,12 @@ def test_custom_table_name_from_register(self):
786790class TestTrackingInheritance (TestCase ):
787791
788792 def test_tracked_abstract_base (self ):
789- class TrackedWithAbstractBase (TrackedAbstractBaseA ):
790- pass
791-
792793 self .assertEqual (
793794 [f .attname for f in TrackedWithAbstractBase .history .model ._meta .fields ],
794795 ['id' , 'history_id' , 'history_date' , 'history_user_id' , 'history_type' ],
795796 )
796797
797798 def test_tracked_concrete_base (self ):
798- class TrackedWithConcreteBase (TrackedConcreteBase ):
799- pass
800-
801799 self .assertEqual (
802800 [f .attname for f in TrackedWithConcreteBase .history .model ._meta .fields ],
803801 ['id' , 'trackedconcretebase_ptr_id' , 'history_id' , 'history_date' , 'history_user_id' , 'history_type' ],
@@ -809,21 +807,12 @@ class TrackedWithMultipleAbstractBases(TrackedAbstractBaseA, TrackedAbstractBase
809807 pass
810808
811809 def test_tracked_abstract_and_untracked_concrete_base (self ):
812- class TrackedWithTrackedAbstractAndUntrackedConcreteBase (TrackedAbstractBaseA , UntrackedConcreteBase ):
813- pass
814-
815810 self .assertEqual (
816811 [f .attname for f in TrackedWithTrackedAbstractAndUntrackedConcreteBase .history .model ._meta .fields ],
817812 ['id' , 'untrackedconcretebase_ptr_id' , 'history_id' , 'history_date' , 'history_user_id' , 'history_type' ],
818813 )
819814
820815 def test_indirect_tracked_abstract_base (self ):
821- class BaseTrackedWithIndirectTrackedAbstractBase (TrackedAbstractBaseA ):
822- pass
823-
824- class TrackedWithIndirectTrackedAbstractBase (BaseTrackedWithIndirectTrackedAbstractBase ):
825- pass
826-
827816 self .assertEqual (
828817 [f .attname for f in TrackedWithIndirectTrackedAbstractBase .history .model ._meta .fields ],
829818 [
@@ -832,12 +821,6 @@ class TrackedWithIndirectTrackedAbstractBase(BaseTrackedWithIndirectTrackedAbstr
832821 )
833822
834823 def test_indirect_tracked_concrete_base (self ):
835- class BaseTrackedWithIndirectTrackedConcreteBase (TrackedAbstractBaseA ):
836- pass
837-
838- class TrackedWithIndirectTrackedConcreteBase (BaseTrackedWithIndirectTrackedConcreteBase ):
839- pass
840-
841824 self .assertEqual (
842825 [f .attname for f in TrackedWithIndirectTrackedConcreteBase .history .model ._meta .fields ],
843826 [
@@ -846,8 +829,5 @@ class TrackedWithIndirectTrackedConcreteBase(BaseTrackedWithIndirectTrackedConcr
846829 )
847830
848831 def test_registering_with_tracked_abstract_base (self ):
849- class TrackedWithAbstractBaseToRegister (TrackedAbstractBaseA ):
850- pass
851-
852832 with self .assertRaises (exceptions .MultipleRegistrationsError ):
853833 register (TrackedWithAbstractBaseToRegister )
0 commit comments