Fixed the admin_filters tests for Postgres.

This commit is contained in:
Julien Phalip 2012-12-04 10:36:56 -08:00
parent 795ac7deda
commit c196e01100
1 changed files with 2 additions and 2 deletions

View File

@ -673,7 +673,7 @@ class ListFiltersTests(TestCase):
""" """
modeladmin = DepartmentFilterEmployeeAdmin(Employee, site) 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) changelist = self.get_changelist(request, Employee, modeladmin)
queryset = changelist.get_query_set(request) queryset = changelist.get_query_set(request)
@ -685,7 +685,7 @@ class ListFiltersTests(TestCase):
choices = list(filterspec.choices(changelist)) choices = list(filterspec.choices(changelist))
self.assertEqual(choices[2]['display'], 'DEV') self.assertEqual(choices[2]['display'], 'DEV')
self.assertEqual(choices[2]['selected'], True) 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): def test_fk_with_to_field(self):
""" """