Example #1
0
 def test_IsTokenValid_GivenInValidToken_E_INVALID_TOKEN(self):
     obj = FourSquareBase(accessToken='invalid_token')
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.E_INVALID_TOKEN)
Example #2
0
 def test_GetMyId_GivenInvalidToken_None(self):
     obj = FourSquareBase(accessToken='invalid_token')
     self.assertIsNone(obj.getMyId())
Example #3
0
 def test_IsTokenValid_GivenValidToken_S_OK(self):
     obj = FourSquareBase(accessToken=TEST_TOKEN)
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.S_OK)
Example #4
0
 def test_GetMyId_GivenValidToken_True(self):
     obj = FourSquareBase(accessToken=TEST_TOKEN)
     self.assertTrue(obj.getMyId())
Example #5
0
 def test_IsTokenValid_GivenInValidToken_E_INVALID_TOKEN(self):
     obj = FourSquareBase(accessToken='invalid_token')
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.E_INVALID_TOKEN)
Example #6
0
 def test_IsTokenValid_GivenValidToken_S_OK(self):
     obj = FourSquareBase(accessToken=TEST_TOKEN)
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.S_OK)
Example #7
0
 def test_GetMyId_GivenInvalidToken_None(self):
     obj = FourSquareBase(accessToken='invalid_token')
     self.assertIsNone(obj.getMyId())
Example #8
0
 def test_GetMyId_GivenValidToken_True(self):
     obj = FourSquareBase(accessToken=TEST_TOKEN)
     self.assertTrue(obj.getMyId())