diff options
| author | Thomas Chaumeny <t.chaumeny@gmail.com> | 2014-09-07 00:13:46 +0200 |
|---|---|---|
| committer | Loic Bistuer <loic.bistuer@gmail.com> | 2014-09-19 01:01:31 +0700 |
| commit | e008a10c2ffef7d64100bcbe83ef2c5f4b1b2168 (patch) | |
| tree | 8a00a1180ce3ee8026634a68fb585e166ea5c30a /tests | |
| parent | abc11b0a33fd823ad341ab2cc113c73545eb61e6 (diff) | |
Fixed #23443 -- Corrected erroneous FieldError message.
Thanks Tim Graham for the review.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/queries/tests.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/queries/tests.py b/tests/queries/tests.py index 198594ea42..20c5f5d8d3 100644 --- a/tests/queries/tests.py +++ b/tests/queries/tests.py @@ -2164,6 +2164,13 @@ class ValuesQuerysetTests(BaseQuerysetTest): qs = qs.values_list('num', flat=True) self.assertQuerysetEqual(qs, [72], self.identity) + def test_field_error_values_list(self): + # see #23443 + with self.assertRaisesMessage(FieldError, + "Cannot resolve keyword %r into field." + " Join on 'name' not permitted." % 'foo'): + Tag.objects.values_list('name__foo') + class QuerySetSupportsPythonIdioms(TestCase): |
