diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-11-16 02:36:00 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-11-16 02:36:00 +0000 |
| commit | 478a4e22ad147175ca8672963154e196dbeb1ab6 (patch) | |
| tree | 173db40763dcc05081945315d95c98ee5c567892 | |
| parent | bfab752286f72af8c6d4be3f30457d669610eab5 (diff) | |
[1.2.X] Added a test for using an `__in` lookup with a ValueListQueryset from a none() call. Refs #14622. Backport of [14568].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | tests/regressiontests/queries/tests.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py index 7302e700e4..71a0504f8b 100644 --- a/tests/regressiontests/queries/tests.py +++ b/tests/regressiontests/queries/tests.py @@ -1430,15 +1430,21 @@ class CloneTests(TestCase): class EmptyQuerySetTests(TestCase): def test_emptyqueryset_values(self): - # #14366 -- calling .values() on an EmptyQuerySet and then cloning that - # should not cause an error - self.assertEqual(list(Number.objects.none().values('num').order_by('num')), []) + # #14366 -- Calling .values() on an EmptyQuerySet and then cloning that + # should not cause an error" + self.assertQuerysetEqual( + Number.objects.none().values('num').order_by('num'), [] + ) def test_values_subquery(self): self.assertQuerysetEqual( Number.objects.filter(pk__in=Number.objects.none().values("pk")), [] ) + self.assertQuerysetEqual( + Number.objects.filter(pk__in=Number.objects.none().values_list("pk")), + [] + ) class WeirdQuerysetSlicingTests(BaseQuerysetTest): |
