diff --git a/tests/admin_utils/test_logentry.py b/tests/admin_utils/test_logentry.py index aaa67ffc13..ba0e3c1bfd 100644 --- a/tests/admin_utils/test_logentry.py +++ b/tests/admin_utils/test_logentry.py @@ -185,7 +185,7 @@ class LogEntryTests(TestCase): self.user.pk, content_type_pk, self.a1.pk, repr(self.a1), CHANGE, change_message='Changed something else', ) - self.assertEqual(log_entry, LogEntry.objects.latest('action_time')) + self.assertEqual(log_entry, LogEntry.objects.latest('id')) def test_recentactions_without_content_type(self): """ diff --git a/tests/modeladmin/tests.py b/tests/modeladmin/tests.py index c9cde5a2c9..c2250b923b 100644 --- a/tests/modeladmin/tests.py +++ b/tests/modeladmin/tests.py @@ -539,9 +539,9 @@ class ModelAdminTests(TestCase): ma = ModelAdmin(Band, self.site) mock_request = MockRequest() mock_request.user = User.objects.create(username='bill') - self.assertEqual(ma.log_addition(mock_request, self.band, 'added'), LogEntry.objects.latest('action_time')) - self.assertEqual(ma.log_change(mock_request, self.band, 'changed'), LogEntry.objects.latest('action_time')) - self.assertEqual(ma.log_change(mock_request, self.band, 'deleted'), LogEntry.objects.latest('action_time')) + self.assertEqual(ma.log_addition(mock_request, self.band, 'added'), LogEntry.objects.latest('id')) + self.assertEqual(ma.log_change(mock_request, self.band, 'changed'), LogEntry.objects.latest('id')) + self.assertEqual(ma.log_change(mock_request, self.band, 'deleted'), LogEntry.objects.latest('id')) class CheckTestCase(SimpleTestCase):