We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6728a4a commit cc9cb4dCopy full SHA for cc9cb4d
oauth2_provider/tests/test_mixins.py
@@ -3,6 +3,7 @@
3
from django.core.exceptions import ImproperlyConfigured
4
from django.views.generic import View
5
from django.test import TestCase, RequestFactory
6
+from django.http import HttpResponse
7
8
from oauthlib.oauth2 import Server
9
@@ -85,6 +86,10 @@ class TestView(ProtectedResourceMixin, View):
85
86
server_class = Server
87
validator_class = OAuth2Validator
88
89
+ def options(self, request, *args, **kwargs):
90
+ """Django 1.4 doesn't provide a default options method"""
91
+ return HttpResponse()
92
+
93
request = self.request_factory.options("/fake-req")
94
view = TestView.as_view()
95
response = view(request)
0 commit comments