コード例 #1
0
    def test_multiple_passes(self):
        req = RequestFactory().get('/')
        req.user = AnonymousUser()
        self.resource._meta.authentication = (
            authentication.SharedSecretAuthentication(),
            # Optional auth passes because there are not auth headers.
            authentication.OptionalOAuthAuthentication())

        eq_(self.resource.is_authenticated(req), None)
コード例 #2
0
 def setUp(self):
     self.auth = authentication.OptionalOAuthAuthentication()