diff options
| author | Mads Jensen <mje@inducks.org> | 2016-11-12 21:42:20 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-28 06:57:01 -0500 |
| commit | aa2cb4c622dfd5709ba89ac3cace959202318987 (patch) | |
| tree | a51596027d4e4443369e66dffd757ccdb286477e /tests/postgres_tests | |
| parent | 6252fd6314f66d2d303cc47c791ffefd27169b42 (diff) | |
Refs #26327 -- Renamed JsonAgg to JSONBAgg.
Thanks to Christian von Roques for the report.
Diffstat (limited to 'tests/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_aggregates.py | 10 |
1 files changed, 5 insertions, 5 deletions
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": []}')) |
