Added test skipping for a PostgreSQL JSONField test.

This commit is contained in:
Tim Graham 2017-09-18 09:11:01 -04:00
parent 3939e2b4dc
commit da1ba03f1d
1 changed files with 2 additions and 0 deletions

View File

@ -1,6 +1,7 @@
from io import StringIO from io import StringIO
from django.core.management import call_command from django.core.management import call_command
from django.test import skipUnlessDBFeature
from django.test.utils import modify_settings from django.test.utils import modify_settings
from . import PostgreSQLTestCase from . import PostgreSQLTestCase
@ -19,6 +20,7 @@ class InspectDBTests(PostgreSQLTestCase):
for field_output in field_outputs: for field_output in field_outputs:
self.assertIn(field_output, output) self.assertIn(field_output, output)
@skipUnlessDBFeature('has_jsonb_datatype')
def test_json_field(self): def test_json_field(self):
self.assertFieldsInModel( self.assertFieldsInModel(
'postgres_tests_jsonmodel', 'postgres_tests_jsonmodel',