Fixed #32073 -- Skipped collation tests on PostgreSQL < 10.

PostgreSQL < 10 doesn't support ICU collations.

Thanks Hannes Ljungberg for the report.
This commit is contained in:
Mariusz Felisiak 2020-10-06 12:51:35 +02:00 committed by GitHub
parent 143d8e1ab3
commit 999cddd58d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 30 additions and 9 deletions

View file

@ -58,10 +58,16 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_deferrable_unique_constraints = True
has_json_operators = True
json_key_contains_list_matching_requires_list = True
test_collations = {
'non_default': 'sv-x-icu',
'swedish_ci': 'sv-x-icu',
}
@cached_property
def test_collations(self):
# PostgreSQL < 10 doesn't support ICU collations.
if self.is_postgresql_10:
return {
'non_default': 'sv-x-icu',
'swedish_ci': 'sv-x-icu',
}
return {}
@cached_property
def introspected_field_types(self):