From 11601ee826bd3bf42e4bd182f97e5d54b152225d Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 28 Dec 2015 17:36:04 -0500 Subject: [PATCH] [1.8.x] Fixed #23285 -- Fixed non-deterministic admin_views test. This test sometimes fail because the checked integers can appear in the output as memory addresses due to #24316. Backport of 2939ed4a18864549a25807193ea5af490d632dc6 from stable/1.9.x --- tests/admin_views/tests.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py index 1997e01545..d05c299223 100644 --- a/tests/admin_views/tests.py +++ b/tests/admin_views/tests.py @@ -299,16 +299,16 @@ class AdminViewBasicTest(AdminViewBasicTestCase): (column 6 is 'model_year_reverse' in ArticleAdmin) """ response = self.client.get(reverse('admin:admin_views_article_changelist'), {'o': '6'}) - self.assertContentBefore(response, '2009', '2008', + self.assertContentBefore(response, '2009,', '2008,', "Results of sorting on ModelAdmin method are out of order.") - self.assertContentBefore(response, '2008', '2000', + self.assertContentBefore(response, '2008,', '2000,', "Results of sorting on ModelAdmin method are out of order.") # Let's make sure the ordering is right and that we don't get a # FieldError when we change to descending order response = self.client.get(reverse('admin:admin_views_article_changelist'), {'o': '-6'}) - self.assertContentBefore(response, '2000', '2008', + self.assertContentBefore(response, '2000,', '2008,', "Results of sorting on ModelAdmin method are out of order.") - self.assertContentBefore(response, '2008', '2009', + self.assertContentBefore(response, '2008,', '2009,', "Results of sorting on ModelAdmin method are out of order.") def test_change_list_sorting_multiple(self):