def test_get_request_token_empty(self): token = get_request_token(self.request) self.assertTrue(type(token) == EmptyToken)
def test_get_request_token(self): at = AccessToken.objects.create_access_token() self.request.session[PERIMETER_SESSION_KEY] = at.token self.assertEqual(get_request_token(self.request), at)