Coverage for sm / test_audit.py: 100%

18 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-24 12:43 +0000

1from django.test import TestCase 

2from cluster.models import Model as Cluster 

3from clusterpackage.models import Model as ClusterPackage 

4from clusterpackagetype.models import Model as ClusterPackageType 

5from clustersoftware.models import Model as ClusterSoftware 

6from domain.models import Model as Domain 

7from location.models import Model as Location 

8from operatingsystem.models import Model as OS 

9from patchtime.models import Model as Patchtime 

10from server.models import Model as Server 

11from servermodel.models import Model as ServerModel 

12from status.models import Model as Status 

13from vendor.models import Model as Vendor 

14 

15 

16class AuditLoggingTest(TestCase): 

17 def test_models_have_history(self): 

18 models = [ 

19 Cluster, 

20 ClusterPackage, 

21 ClusterPackageType, 

22 ClusterSoftware, 

23 Domain, 

24 Location, 

25 OS, 

26 Patchtime, 

27 Server, 

28 ServerModel, 

29 Status, 

30 Vendor, 

31 ] 

32 for model in models: 

33 self.assertTrue( 

34 hasattr(model, "history"), 

35 f"Model {model.__name__} is missing audit history!", 

36 )