diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2012-10-20 15:33:40 -0700 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2012-10-20 15:33:40 -0700 |
| commit | 6b0d93df18a5c265f87ee6e64dbdffbdecfcea4f (patch) | |
| tree | 19625465f3c257fc7ae04fff54af6250e5c5f6a0 /tests | |
| parent | d7c6a57d606bbb8185f9215ffce4c0516a9ae438 (diff) | |
| parent | b87e2f46c80d15abcda0e181ab894fb938ceb12f (diff) | |
Merge pull request #456 from JanBednarik/ticket_19151
Fixed #19151 -- Added missing methods to EmptyQuerySet.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/queries/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py index 71ac107486..c2a4ad1caf 100644 --- a/tests/regressiontests/queries/tests.py +++ b/tests/regressiontests/queries/tests.py @@ -1698,6 +1698,13 @@ class EmptyQuerySetTests(TestCase): [] ) + def test_ticket_19151(self): + # #19151 -- Calling .values() or .values_list() on an EmptyQuerySet + # should return EmptyQuerySet and not cause an error. + q = EmptyQuerySet() + self.assertQuerysetEqual(q.values(), []) + self.assertQuerysetEqual(q.values_list(), []) + class ValuesQuerysetTests(BaseQuerysetTest): def test_flat_values_lits(self): |
