Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.5.x] Fixed the admin_filters tests for Postgres.

Backport of c196e01
  • Loading branch information...
commit db455d6ff9655eee09b0473afff599effd5bbe1a 1 parent 7fea7cf
@jphalip jphalip authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 tests/regressiontests/admin_filters/tests.py
View
4 tests/regressiontests/admin_filters/tests.py
@@ -673,7 +673,7 @@ def test_lookup_with_non_string_value(self):
"""
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 @@ def test_lookup_with_non_string_value(self):
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):
"""
Please sign in to comment.
Something went wrong with that request. Please try again.