From fa0ef1773773c58b5708abad0e90a44fc9a308f8 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Tue, 2 Sep 2014 14:53:37 +0200 Subject: Remove Login Dropdown when Auth Views are not registered. Fixes #1738 --- tests/browsable_api/views.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/browsable_api/views.py (limited to 'tests/browsable_api/views.py') 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}) -- cgit v1.2.3