mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +03:00
994e1ba927
* Added TEMPLATES setting to tests * Remove deprecated view-string in URL conf * Replace 'urls = ...' in test classes with override_settings('ROOT_URLCONF=...') * Refactor UsingURLPatterns to use override_settings(ROOT_URLCONF=...) style * Get model managers and names in a version-compatible manner. * Apply override_settings to a TestCase, not a mixin class * Use '.callback' property instead of private attributes when inspecting urlpatterns * Pass 'user' to template explicitly * Correct sorting of import statements. * Remove unused TEMPLATE_LOADERS setting, in favor of TEMPLATES. * Remove code style issue * BaseFilter test requires a concrete model * Resolve tox.ini issues * Resolve isort differences between local and tox environments
14 lines
435 B
Python
14 lines
435 B
Python
from __future__ import unicode_literals
|
|
|
|
from rest_framework import authentication, renderers
|
|
from rest_framework.response import Response
|
|
from rest_framework.views import APIView
|
|
|
|
|
|
class MockView(APIView):
|
|
authentication_classes = (authentication.SessionAuthentication,)
|
|
renderer_classes = (renderers.BrowsableAPIRenderer, renderers.JSONRenderer)
|
|
|
|
def get(self, request):
|
|
return Response({'a': 1, 'b': 2, 'c': 3})
|