Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

[1.5.x] Fixed #19112 -- Reduced the amount of query params in a test

Backpatch of 604d876.
  • Loading branch information...
commit 7b5ca126ee37cd386d9900b2ef29901debb28e9e 1 parent b18ad80
Anssi Kääriäinen authored February 10, 2013

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. 6  tests/regressiontests/queries/tests.py
6  tests/regressiontests/queries/tests.py
@@ -1881,8 +1881,10 @@ def test_null_ordering_added(self):
1881 1881
     @skipUnlessDBFeature('supports_1000_query_parameters')
1882 1882
     def test_ticket14244(self):
1883 1883
         # Test that the "in" lookup works with lists of 1000 items or more.
  1884
+        # The numbers amount is picked to force three different IN batches
  1885
+        # for Oracle, yet to be less than 2100 parameter limit for MSSQL.
  1886
+        numbers = range(2050)
1884 1887
         Number.objects.all().delete()
1885  
-        numbers = range(2500)
1886 1888
         Number.objects.bulk_create(Number(num=num) for num in numbers)
1887 1889
         self.assertEqual(
1888 1890
             Number.objects.filter(num__in=numbers[:1000]).count(),
@@ -1898,7 +1900,7 @@ def test_ticket14244(self):
1898 1900
         )
1899 1901
         self.assertEqual(
1900 1902
             Number.objects.filter(num__in=numbers).count(),
1901  
-            2500
  1903
+            len(numbers)
1902 1904
         )
1903 1905
 
1904 1906
 

0 notes on commit 7b5ca12

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