mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 11:30:12 +03:00
tests.urls: handle optional coreapi
This commit is contained in:
parent
28b449e793
commit
1e2130379e
|
@ -5,8 +5,12 @@ We need only the docs urls for DocumentationRenderer tests.
|
|||
"""
|
||||
from django.conf.urls import url
|
||||
|
||||
from rest_framework.compat import coreapi
|
||||
from rest_framework.documentation import include_docs_urls
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^docs/', include_docs_urls(title='Test Suite API')),
|
||||
]
|
||||
if coreapi:
|
||||
urlpatterns = [
|
||||
url(r'^docs/', include_docs_urls(title='Test Suite API')),
|
||||
]
|
||||
else:
|
||||
urlpatterns = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user