summaryrefslogtreecommitdiff
path: root/tests/admin_views/tests.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-09-04 11:12:24 -0400
committerTim Graham <timograham@gmail.com>2015-09-04 12:33:11 -0400
commitd5bac7e4493e7de1e59c744da33b7a561c167485 (patch)
tree4d5500ed18e7974b46393276bf6b44f2dd449718 /tests/admin_views/tests.py
parente133b55943f26e87cff5b22215a776a9ce3fc6f3 (diff)
Fixed #25353 -- Changed LogEntry.action_time to a "date created".
Diffstat (limited to 'tests/admin_views/tests.py')
-rw-r--r--tests/admin_views/tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index f10075d49f..986add8479 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -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),)))