mirror of
https://github.com/django/django.git
synced 2025-08-03 18:38:50 +00:00
Fixed #30155 -- Dropped support for PostgreSQL 9.4 and PostGIS 2.1.
This commit is contained in:
parent
d47498c5df
commit
39ebdf5a3c
13 changed files with 21 additions and 78 deletions
|
@ -1,7 +1,6 @@
|
|||
import json
|
||||
|
||||
from django.db.models.expressions import F, Value
|
||||
from django.test.testcases import skipUnlessDBFeature
|
||||
from django.test.utils import Approximate
|
||||
|
||||
from . import PostgreSQLTestCase
|
||||
|
@ -184,12 +183,10 @@ class TestGeneralAggregate(PostgreSQLTestCase):
|
|||
)
|
||||
self.assertEqual(values, {'arrayagg': [0, 1, 0, 2]})
|
||||
|
||||
@skipUnlessDBFeature('has_jsonb_agg')
|
||||
def test_json_agg(self):
|
||||
values = AggregateTestModel.objects.aggregate(jsonagg=JSONBAgg('char_field'))
|
||||
self.assertEqual(values, {'jsonagg': ['Foo1', 'Foo2', 'Foo4', 'Foo3']})
|
||||
|
||||
@skipUnlessDBFeature('has_jsonb_agg')
|
||||
def test_json_agg_empty(self):
|
||||
values = AggregateTestModel.objects.none().aggregate(jsonagg=JSONBAgg('integer_field'))
|
||||
self.assertEqual(values, json.loads('{"jsonagg": []}'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue