1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #23443 -- Corrected erroneous FieldError message.

Thanks Tim Graham for the review.
This commit is contained in:
Thomas Chaumeny
2014-09-07 00:13:46 +02:00
committed by Loic Bistuer
parent abc11b0a33
commit e008a10c2f
2 changed files with 16 additions and 8 deletions

View File

@@ -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):