Example #1
0
 def test_IsTokenValid_GivenInValidToken_E_INVALID_TOKEN(self):
     obj = FbBase(accessToken='invalid_token')
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.E_INVALID_TOKEN)
Example #2
0
 def test_GetMyAvatar_HasAvatarUri_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertTrue(obj.getMyAvatar())
Example #3
0
 def test_IsTokenValid_GivenValidToken_S_OK(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.S_OK)
Example #4
0
 def test_GetMyName_EqualMyName_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertEqual(obj.getMyName(), 'Kudo Chien')
Example #5
0
 def test_GetMyEmail_EqualMyEmail_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertEqual(obj.getMyEmail(), '*****@*****.**')
Example #6
0
 def test_IsTokenValid_GivenInValidToken_E_INVALID_TOKEN(self):
     obj = FbBase(accessToken='invalid_token')
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.E_INVALID_TOKEN)
Example #7
0
 def test_IsTokenValid_GivenValidToken_S_OK(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.S_OK)
Example #8
0
 def test_GetMyAvatar_HasAvatarUri_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertTrue(obj.getMyAvatar())
Example #9
0
 def test_GetMyEmail_EqualMyEmail_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertEqual(obj.getMyEmail(), '*****@*****.**')
Example #10
0
 def test_GetMyName_EqualMyName_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertEqual(obj.getMyName(), 'Kudo Chien')