Ticket #10197: 10197_regression.diff

File 10197_regression.diff, 693 bytes (added by Bob Thomas, 16 years ago)

Regression test demonstrating failure

  • tests/regressiontests/aggregation_regress/models.py

     
    11# coding: utf-8
     2import pickle
    23from django.db import models
    34from django.conf import settings
    45
     
    259260>>> Book.objects.annotate(Count('publisher')).values('publisher').count()
    2602616
    261262
     263# Regression for #10197 - annotated QuerySet cannot be pickled
     264>>> qs = Book.objects.annotate(Count('publisher'))
     265>>> q2 = pickle.loads(pickle.dumps(qs))
     266>>> list(qs) == list(q2)
     267True
     268
    262269"""
    263270}
    264271
Back to Top