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 2e1c58e commit 16524e0Copy full SHA for 16524e0
oauth2_provider/tests/test_mixins.py
@@ -42,6 +42,22 @@ class TestView(OAuthLibMixin, View):
42
43
self.assertIsInstance(test_view.get_server(), Server)
44
45
+ def test_custom_backend(self):
46
+ class AnotherOauthLibBackend(object):
47
+ pass
48
+
49
+ class TestView(OAuthLibMixin, View):
50
+ server_class = Server
51
+ validator_class = OAuth2Validator
52
+ oauthlib_core_class = AnotherOauthLibBackend
53
54
+ request = self.request_factory.get("/fake-req")
55
+ request.user = "fake"
56
+ test_view = TestView()
57
58
+ self.assertEqual(test_view.get_oauthlib_core_class(),
59
+ AnotherOauthLibBackend)
60
61
62
class TestScopedResourceMixin(TestCase):
63
@classmethod
0 commit comments