From db455d6ff9655eee09b0473afff599effd5bbe1a Mon Sep 17 00:00:00 2001 From: Julien Phalip Date: Tue, 4 Dec 2012 10:36:56 -0800 Subject: [PATCH] [1.5.x] Fixed the admin_filters tests for Postgres. Backport of c196e01100b2 --- tests/regressiontests/admin_filters/tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/regressiontests/admin_filters/tests.py b/tests/regressiontests/admin_filters/tests.py index d00490038d..4a3e6135c3 100644 --- a/tests/regressiontests/admin_filters/tests.py +++ b/tests/regressiontests/admin_filters/tests.py @@ -673,7 +673,7 @@ class ListFiltersTests(TestCase): """ modeladmin = DepartmentFilterEmployeeAdmin(Employee, site) - request = self.request_factory.get('/', {'department': '1'}) + request = self.request_factory.get('/', {'department': self.john.pk}) changelist = self.get_changelist(request, Employee, modeladmin) queryset = changelist.get_query_set(request) @@ -685,7 +685,7 @@ class ListFiltersTests(TestCase): choices = list(filterspec.choices(changelist)) self.assertEqual(choices[2]['display'], 'DEV') self.assertEqual(choices[2]['selected'], True) - self.assertEqual(choices[2]['query_string'], '?department=1') + self.assertEqual(choices[2]['query_string'], '?department=%s' % self.john.pk) def test_fk_with_to_field(self): """