1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Refs #31300 -- Allowed testing GeneratedField without collation.

CockroachDB and Snowflake don't support it.
This commit is contained in:
Tim Graham
2023-11-01 20:43:16 -04:00
committed by Mariusz Felisiak
parent 116e225266
commit 208870b612
7 changed files with 18 additions and 21 deletions

View File

@@ -165,12 +165,8 @@ class GeneratedFieldTestMixin:
with self.assertNumQueries(0), self.assertRaises(does_not_exist):
self.base_model.objects.get(field__gte=overflow_value)
@skipUnlessDBFeature("supports_collation_on_charfield")
def test_output_field(self):
collation = connection.features.test_collations.get("non_default")
if not collation:
self.skipTest("Language collations are not supported.")
collation = connection.features.test_collations["virtual"]
m = self.output_field_model.objects.create(name="NAME")
field = m._meta.get_field("lower_name")
db_parameters = field.db_parameters(connection)
@@ -181,7 +177,6 @@ class GeneratedFieldTestMixin:
field._resolved_expression.output_field.db_type(connection),
)
@skipUnlessDBFeature("supports_collation_on_charfield")
def test_db_type_parameters(self):
db_type_parameters = self.output_field_model._meta.get_field(
"lower_name"