aboutsummaryrefslogtreecommitdiffstats
path: root/tests/browsable_api/views.py
diff options
context:
space:
mode:
authorTom Christie2014-09-11 13:20:44 +0100
committerTom Christie2014-09-11 13:20:44 +0100
commitde301f3b6647e1c79a506405a88071ef977418d1 (patch)
tree407f3497b422f334b47088b0bb35d39a8a3a520a /tests/browsable_api/views.py
parent80ba0473473501968154c5cc5dd5922e53d96a70 (diff)
parent015a8122c7738dd8913939b42d3f0ec932d88711 (diff)
downloaddjango-rest-framework-de301f3b6647e1c79a506405a88071ef977418d1.tar.bz2
Merge master
Diffstat (limited to 'tests/browsable_api/views.py')
-rw-r--r--tests/browsable_api/views.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/browsable_api/views.py b/tests/browsable_api/views.py
new file mode 100644
index 00000000..000f4e80
--- /dev/null
+++ b/tests/browsable_api/views.py
@@ -0,0 +1,15 @@
+from __future__ import unicode_literals
+
+from rest_framework.views import APIView
+from rest_framework import authentication
+from rest_framework import renderers
+from rest_framework.response import Response
+
+
+class MockView(APIView):
+
+ authentication_classes = (authentication.SessionAuthentication,)
+ renderer_classes = (renderers.BrowsableAPIRenderer,)
+
+ def get(self, request):
+ return Response({'a': 1, 'b': 2, 'c': 3})