class GoogleBackendTest(TestCase): def setUp(self): self.factory = RequestFactory() self.backend = GoogleBackend() def test_get_session_access_denied(self): with self.assertRaises(PermissionDeniedException): self.backend.get_session( google=self.factory.get('/', data={'error': 'access_denied'}))
def setUp(self): self.factory = RequestFactory() self.backend = GoogleBackend()