def test_IsTokenValid_GivenInValidToken_E_INVALID_TOKEN(self): obj = FourSquareBase(accessToken='invalid_token') resp = obj.isTokenValid() self.assertEqual(resp, ErrorCode.E_INVALID_TOKEN)
def test_GetMyId_GivenInvalidToken_None(self): obj = FourSquareBase(accessToken='invalid_token') self.assertIsNone(obj.getMyId())
def test_IsTokenValid_GivenValidToken_S_OK(self): obj = FourSquareBase(accessToken=TEST_TOKEN) resp = obj.isTokenValid() self.assertEqual(resp, ErrorCode.S_OK)
def test_GetMyId_GivenValidToken_True(self): obj = FourSquareBase(accessToken=TEST_TOKEN) self.assertTrue(obj.getMyId())