1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #25353 -- Changed LogEntry.action_time to a "date created".

This commit is contained in:
Tim Graham
2015-09-04 11:12:24 -04:00
parent e133b55943
commit d5bac7e449
3 changed files with 48 additions and 5 deletions

View File

@@ -2405,6 +2405,16 @@ class AdminViewStringPrimaryKeyTest(TestCase):
edited_obj = logentry.get_edited_object()
self.assertEqual(logentry.object_id, str(edited_obj.pk))
def test_logentry_save(self):
""""
LogEntry.action_time is a timestamp of the date when the entry was
created. It shouldn't be updated on a subsequent save().
"""
logentry = LogEntry.objects.get(content_type__model__iexact="modelwithstringprimarykey")
action_time = logentry.action_time
logentry.save()
self.assertEqual(logentry.action_time, action_time)
def test_deleteconfirmation_link(self):
"The link from the delete confirmation page referring back to the changeform of the object should be quoted"
response = self.client.get(reverse('admin:admin_views_modelwithstringprimarykey_delete', args=(quote(self.pk),)))