Skip to content

Commit 0006ae4

Browse files
committed
Skip test if coreapi not installed.
1 parent 637a263 commit 0006ae4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/schemas/test_get_schema_view.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from django.test import TestCase, override_settings
23

34
from rest_framework import renderers
@@ -11,6 +12,7 @@ def test_openapi(self):
1112
assert isinstance(schema_view.initkwargs['schema_generator'], openapi.SchemaGenerator)
1213
assert renderers.OpenAPIRenderer in schema_view.cls().renderer_classes
1314

15+
@pytest.mark.skipif(not coreapi, reason='coreapi is not installed')
1416
def test_coreapi(self):
1517
with override_settings(REST_FRAMEWORK={'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.AutoSchema'}):
1618
schema_view = get_schema_view(title="With CoreAPI")

0 commit comments

Comments
 (0)