diff options
| author | Nick Pope <nick@nickpope.me.uk> | 2021-06-22 09:58:01 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-06-28 09:22:23 +0200 |
| commit | 66af94d56ea08ccf8d906708a6cc002dd3ab24d3 (patch) | |
| tree | 8d88082667f476d7f9ea7da26615caeebcf47727 /tests/postgres_tests/test_aggregates.py | |
| parent | e8e8e207e72835cac3e36e3e26a864c59d5b490f (diff) | |
Removed unnecessary json.loads() call in test_json_agg_empty().
Diffstat (limited to 'tests/postgres_tests/test_aggregates.py')
| -rw-r--r-- | tests/postgres_tests/test_aggregates.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/postgres_tests/test_aggregates.py b/tests/postgres_tests/test_aggregates.py index d7656d8b50..1b49c92824 100644 --- a/tests/postgres_tests/test_aggregates.py +++ b/tests/postgres_tests/test_aggregates.py @@ -1,5 +1,3 @@ -import json - from django.db.models import CharField, F, OuterRef, Q, Subquery, Value from django.db.models.fields.json import KeyTextTransform, KeyTransform from django.db.models.functions import Cast, Concat, Substr @@ -281,7 +279,7 @@ class TestGeneralAggregate(PostgreSQLTestCase): def test_jsonb_agg_empty_result(self): AggregateTestModel.objects.all().delete() values = AggregateTestModel.objects.aggregate(jsonbagg=JSONBAgg('integer_field')) - self.assertEqual(values, json.loads('{"jsonbagg": []}')) + self.assertEqual(values, {'jsonbagg': []}) def test_jsonb_agg_charfield_ordering(self): ordering_test_cases = ( |
