Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

Backport of c196e01
  • Loading branch information...
commit 8c9a8fd5c4e5ed157d2d5fa09f3d6d05d2290bbf 1 parent c721722
Julien Phalip authored December 04, 2012
4  tests/regressiontests/admin_filters/tests.py
@@ -671,7 +671,7 @@ def test_lookup_with_non_string_value(self):
671 671
         """
672 672
 
673 673
         modeladmin = DepartmentFilterEmployeeAdmin(Employee, site)
674  
-        request = self.request_factory.get('/', {'department': '1'})
  674
+        request = self.request_factory.get('/', {'department': self.john.pk})
675 675
         changelist = self.get_changelist(request, Employee, modeladmin)
676 676
 
677 677
         queryset = changelist.get_query_set(request)
@@ -684,7 +684,7 @@ def test_lookup_with_non_string_value(self):
684 684
 
685 685
         self.assertEqual(choices[2]['display'], u'DEV')
686 686
         self.assertEqual(choices[2]['selected'], True)
687  
-        self.assertEqual(choices[2]['query_string'], '?department=1')
  687
+        self.assertEqual(choices[2]['query_string'], '?department=%s' % self.john.pk)
688 688
 
689 689
     def test_fk_with_to_field(self):
690 690
         """

0 notes on commit 8c9a8fd

Please sign in to comment.
Something went wrong with that request. Please try again.