Refs #21113 -- Updated test to allow for bad MySQL time resolution

This commit is contained in:
Claude Paroz 2016-01-10 19:16:49 +01:00
parent 3541ca1504
commit 4a03e6f272
1 changed files with 2 additions and 2 deletions

View File

@ -61,7 +61,7 @@ class LogEntryTests(TestCase):
change_url = reverse('admin:admin_utils_article_change', args=[quote(self.a1.pk)])
response = self.client.post(change_url, post_data)
self.assertRedirects(response, reverse('admin:admin_utils_article_changelist'))
logentry = LogEntry.objects.filter(content_type__model__iexact='article').latest('action_time')
logentry = LogEntry.objects.filter(content_type__model__iexact='article').latest('id')
self.assertEqual(logentry.get_change_message(), 'Changed title and hist.')
with translation.override('fr'):
self.assertEqual(logentry.get_change_message(), 'Modification de title et hist.')
@ -70,7 +70,7 @@ class LogEntryTests(TestCase):
post_data['title'] = 'New'
response = self.client.post(add_url, post_data)
self.assertRedirects(response, reverse('admin:admin_utils_article_changelist'))
logentry = LogEntry.objects.filter(content_type__model__iexact='article').latest('action_time')
logentry = LogEntry.objects.filter(content_type__model__iexact='article').latest('id')
self.assertEqual(logentry.get_change_message(), 'Added.')
with translation.override('fr'):
self.assertEqual(logentry.get_change_message(), 'Ajout.')