Fix tests crash on SQLite without JSON1 extension. (#7409)

This commit is contained in:
Mariusz Felisiak 2020-07-12 11:08:40 +02:00 committed by GitHub
parent 76232437d4
commit 4b06e0a5a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -311,6 +311,9 @@ if postgres_fields:
"""Model declaring a postgres JSONField""" """Model declaring a postgres JSONField"""
data = postgres_fields.JSONField() data = postgres_fields.JSONField()
class Meta:
required_db_features = {'supports_json_field'}
@pytest.mark.skipif(not postgres_fields, reason='psycopg2 is not installed') @pytest.mark.skipif(not postgres_fields, reason='psycopg2 is not installed')
class TestNestedNonRelationalFieldWrite: class TestNestedNonRelationalFieldWrite: