aboutsummaryrefslogtreecommitdiffstats
path: root/tests/browsable_api/views.py
diff options
context:
space:
mode:
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})