Code

Ticket #14011: test14011.patch

File test14011.patch, 586 bytes (added by mk, 4 years ago)
  • tests/regressiontests/queries/models.py

    diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
    index f22cfb3..2231482 100644
    a b True 
    12711271>>> subq._result_cache is None 
    12721272True 
    12731273 
     1274# Regression test for #14011 
     1275>>> category = Number.objects.create(num=42) 
     1276>>> pks = Number.objects.order_by('num').none().values('pk') 
     1277>>> Number.objects.exclude(pk__in=pks) 
     1278[] 
     1279>>> Number.objects.exclude(pk__in=pks.query) 
     1280[] 
    12741281"""} 
    12751282 
    12761283# In Python 2.6 beta releases, exceptions raised in __len__