Used django_test_skips to skip JSOANArrayAgg order_by tests on MySQL.

This commit is contained in:
lufafajoshua 2025-09-11 12:50:19 +03:00
parent 82a0cca363
commit 66e4bb9454
2 changed files with 4 additions and 5 deletions

View file

@ -103,6 +103,9 @@ class DatabaseFeatures(BaseDatabaseFeatures):
"update.tests.AdvancedTests.test_update_ordered_by_m2m_annotation",
"update.tests.AdvancedTests.test_update_ordered_by_m2m_annotation_desc",
},
"MySQL does not correctly support ORDER BY in JSON_ARRAYAGG.": {
"aggregation.tests.JSONArrayAggTests.test_order_by",
},
}
if not self.supports_explain_analyze:
skips.update(

View file

@ -2,7 +2,7 @@ import datetime
import math
import re
from decimal import Decimal
from unittest import skipIf, skipUnless
from unittest import skipUnless
from django.core.exceptions import FieldError
from django.db import NotSupportedError, connection
@ -2818,10 +2818,6 @@ class JSONArrayAggTests(TestCase):
)
self.assertEqual(val, {"jsonarrayagg": ["<empty>"]})
@skipIf(
connection.vendor == "mysql",
"MySQL does not correctly support ORDER BY in JSON_ARRAYAGG.",
)
@skipUnlessDBFeature("supports_aggregate_order_by_clause")
def test_order_by(self):
for order_by, expected_result in (