mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 22:04:48 +03:00
Clean up test failures
This commit is contained in:
parent
b64340ba63
commit
c890ad4d67
|
@ -22,7 +22,7 @@ from django.utils import six
|
|||
|
||||
from rest_framework import VERSION, exceptions, serializers, status
|
||||
from rest_framework.compat import (
|
||||
coreapi, INDENT_SEPARATORS, LONG_SEPARATORS, SHORT_SEPARATORS,
|
||||
INDENT_SEPARATORS, LONG_SEPARATORS, SHORT_SEPARATORS, coreapi,
|
||||
template_render
|
||||
)
|
||||
from rest_framework.exceptions import ParseError
|
||||
|
@ -795,4 +795,4 @@ class CoreJSONRenderer(BaseRenderer):
|
|||
def render(self, data, media_type=None, renderer_context=None):
|
||||
indent = bool(renderer_context.get('indent', 0))
|
||||
codec = coreapi.codecs.CoreJSONCodec()
|
||||
return codec.dump(data, indent=True)
|
||||
return codec.dump(data, indent=indent)
|
||||
|
|
|
@ -236,7 +236,6 @@ class SimpleRouter(BaseRouter):
|
|||
"""
|
||||
Use the registered viewsets to generate a list of URL patterns.
|
||||
"""
|
||||
self.get_links()
|
||||
ret = []
|
||||
|
||||
for prefix, viewset, basename in self.registry:
|
||||
|
@ -264,7 +263,6 @@ class SimpleRouter(BaseRouter):
|
|||
return ret
|
||||
|
||||
def get_links(self):
|
||||
ret = []
|
||||
content = {}
|
||||
|
||||
for prefix, viewset, basename in self.registry:
|
||||
|
|
Loading…
Reference in New Issue
Block a user