Fix tests crash on SQLite without JSON1 extension.

This commit is contained in:
Mariusz Felisiak 2020-07-12 10:41:53 +02:00
parent 76232437d4
commit e72a0a44a4

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: