summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/queries/tests.py7
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):