Skip to content

Commit cc9cb4d

Browse files
committed
fixed tests for Django 1.4
1 parent 6728a4a commit cc9cb4d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

oauth2_provider/tests/test_mixins.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from django.core.exceptions import ImproperlyConfigured
44
from django.views.generic import View
55
from django.test import TestCase, RequestFactory
6+
from django.http import HttpResponse
67

78
from oauthlib.oauth2 import Server
89

@@ -85,6 +86,10 @@ class TestView(ProtectedResourceMixin, View):
8586
server_class = Server
8687
validator_class = OAuth2Validator
8788

89+
def options(self, request, *args, **kwargs):
90+
"""Django 1.4 doesn't provide a default options method"""
91+
return HttpResponse()
92+
8893
request = self.request_factory.options("/fake-req")
8994
view = TestView.as_view()
9095
response = view(request)

0 commit comments

Comments
 (0)