From 92434bb0f5fa30c7ce3bf9c8ae6600c4da781eac Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 2 Nov 2020 10:47:42 -0500 Subject: Fixed DistinctOnTests.test_basic_distinct_on on CockroachDB. --- tests/distinct_on_fields/tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/distinct_on_fields/tests.py b/tests/distinct_on_fields/tests.py index 009b0191fb..e19c3c1b65 100644 --- a/tests/distinct_on_fields/tests.py +++ b/tests/distinct_on_fields/tests.py @@ -1,3 +1,4 @@ +from django.db import connection from django.db.models import CharField, Max from django.db.models.functions import Lower from django.test import TestCase, skipUnlessDBFeature @@ -70,7 +71,9 @@ class DistinctOnTests(TestCase): ), ( Tag.objects.order_by('parent__pk', 'pk').distinct('parent'), - ['', '', ''], + ['', '', ''] + if connection.features.nulls_order_largest + else ['', '', ''], ), ( StaffTag.objects.select_related('staff').distinct('staff__name').order_by('staff__name'), -- cgit v1.2.1