summaryrefslogtreecommitdiff
path: root/tests/queryset_pickle
diff options
context:
space:
mode:
authorLoic Bistuer <loic.bistuer@sixmedia.com>2013-07-26 11:59:40 +0300
committerAnssi Kääriäinen <akaariai@gmail.com>2013-07-26 12:41:27 +0300
commit31fadc120213284da76801cc7bc56e9f32d7281b (patch)
tree534ba416b05409f03c524e1bb3ebd7dc581667b5 /tests/queryset_pickle
parent8f3aefdec33f6cb4bdda142ff9f7fa423c0bebbd (diff)
downloaddjango-31fadc120213284da76801cc7bc56e9f32d7281b.tar.gz
Fixed #20625 -- Chainable Manager/QuerySet methods.
Additionally this patch solves the orthogonal problem that specialized `QuerySet` like `ValuesQuerySet` didn't inherit from the current `QuerySet` type. This wasn't an issue until now because we didn't officially support custom `QuerySet` but it became necessary with the introduction of this new feature. Thanks aaugustin, akaariai, carljm, charettes, mjtamlyn, shaib and timgraham for the reviews.
Diffstat (limited to 'tests/queryset_pickle')
-rw-r--r--tests/queryset_pickle/tests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/queryset_pickle/tests.py b/tests/queryset_pickle/tests.py
index b4b540c80d..d2f333a9b3 100644
--- a/tests/queryset_pickle/tests.py
+++ b/tests/queryset_pickle/tests.py
@@ -90,3 +90,7 @@ class PickleabilityTestCase(TestCase):
reloaded = pickle.loads(dumped)
self.assertEqual(original, reloaded)
self.assertIs(reloaded.__class__, dynclass)
+
+ def test_specialized_queryset(self):
+ self.assert_pickles(Happening.objects.values('name'))
+ self.assert_pickles(Happening.objects.values('name').dates('when', 'year'))