summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/test_aggregates.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/postgres_tests/test_aggregates.py b/tests/postgres_tests/test_aggregates.py
index c2f38e42b6..9cca121802 100644
--- a/tests/postgres_tests/test_aggregates.py
+++ b/tests/postgres_tests/test_aggregates.py
@@ -686,6 +686,15 @@ class TestGeneralAggregate(PostgreSQLTestCase):
],
)
+ def test_values_list(self):
+ tests = [ArrayAgg("integer_field"), JSONBAgg("integer_field")]
+ for aggregation in tests:
+ with self.subTest(aggregation=aggregation):
+ self.assertCountEqual(
+ AggregateTestModel.objects.values_list(aggregation),
+ [([0],), ([1],), ([2],), ([0],)],
+ )
+
class TestAggregateDistinct(PostgreSQLTestCase):
@classmethod