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:
committed by
Loic Bistuer
parent
abc11b0a33
commit
e008a10c2f
@@ -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):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user