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)
def setUp(self): self.auth = authentication.OptionalOAuthAuthentication()