From aa2cb4c622dfd5709ba89ac3cace959202318987 Mon Sep 17 00:00:00 2001 From: Mads Jensen Date: Sat, 12 Nov 2016 21:42:20 +0100 Subject: Refs #26327 -- Renamed JsonAgg to JSONBAgg. Thanks to Christian von Roques for the report. --- tests/postgres_tests/test_aggregates.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/postgres_tests') diff --git a/tests/postgres_tests/test_aggregates.py b/tests/postgres_tests/test_aggregates.py index aaab3b1bc6..9aa0e06595 100644 --- a/tests/postgres_tests/test_aggregates.py +++ b/tests/postgres_tests/test_aggregates.py @@ -9,7 +9,7 @@ from .models import AggregateTestModel, StatTestModel try: from django.contrib.postgres.aggregates import ( - ArrayAgg, BitAnd, BitOr, BoolAnd, BoolOr, Corr, CovarPop, JsonAgg, + ArrayAgg, BitAnd, BitOr, BoolAnd, BoolOr, Corr, CovarPop, JSONBAgg, RegrAvgX, RegrAvgY, RegrCount, RegrIntercept, RegrR2, RegrSlope, RegrSXX, RegrSXY, RegrSYY, StatAggregate, StringAgg, ) @@ -117,14 +117,14 @@ class TestGeneralAggregate(PostgreSQLTestCase): values = AggregateTestModel.objects.aggregate(stringagg=StringAgg('char_field', delimiter=';')) self.assertEqual(values, {'stringagg': ''}) - @skipUnlessDBFeature('has_jsonb_datatype') + @skipUnlessDBFeature('has_jsonb_agg') def test_json_agg(self): - values = AggregateTestModel.objects.aggregate(jsonagg=JsonAgg('char_field')) + values = AggregateTestModel.objects.aggregate(jsonagg=JSONBAgg('char_field')) self.assertEqual(values, {'jsonagg': ['Foo1', 'Foo2', 'Foo3', 'Foo4']}) - @skipUnlessDBFeature('has_jsonb_datatype') + @skipUnlessDBFeature('has_jsonb_agg') def test_json_agg_empty(self): - values = AggregateTestModel.objects.none().aggregate(jsonagg=JsonAgg('integer_field')) + values = AggregateTestModel.objects.none().aggregate(jsonagg=JSONBAgg('integer_field')) self.assertEqual(values, json.loads('{"jsonagg": []}')) -- cgit v1.3