File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,22 +22,6 @@ class TestAuditConfig(TestCase):
2222
2323 """Test audit configuration functionality."""
2424
25- @patch ("dojo.auditlog.pghistory" )
26- def test_register_django_pghistory_models (self , mock_pghistory ):
27- """Test that register_django_pghistory_models registers all models."""
28- # Mock pghistory.track
29- mock_pghistory .track = MagicMock ()
30- mock_pghistory .InsertEvent = MagicMock ()
31- mock_pghistory .UpdateEvent = MagicMock ()
32- mock_pghistory .DeleteEvent = MagicMock ()
33- mock_pghistory .ManualEvent = MagicMock ()
34-
35- register_django_pghistory_models ()
36-
37- # Verify that track was called multiple times (once for each model)
38- self .assertTrue (mock_pghistory .track .called )
39- self .assertGreater (mock_pghistory .track .call_count , 5 )
40-
4125 @patch ("dojo.auditlog.call_command" )
4226 def test_configure_pghistory_triggers_enabled (self , mock_call_command ):
4327 """Test that configure_pghistory_triggers enables triggers when audit logging is enabled."""
You can’t perform that action at this time.
0 commit comments