示例#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)
示例#2
0
 def test_GetMyAvatar_HasAvatarUri_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertTrue(obj.getMyAvatar())
示例#3
0
 def test_IsTokenValid_GivenValidToken_S_OK(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.S_OK)
示例#4
0
 def test_GetMyName_EqualMyName_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertEqual(obj.getMyName(), 'Kudo Chien')
示例#5
0
 def test_GetMyEmail_EqualMyEmail_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertEqual(obj.getMyEmail(), '*****@*****.**')
示例#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)
示例#7
0
 def test_IsTokenValid_GivenValidToken_S_OK(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     resp = obj.isTokenValid()
     self.assertEqual(resp, ErrorCode.S_OK)
示例#8
0
 def test_GetMyAvatar_HasAvatarUri_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertTrue(obj.getMyAvatar())
示例#9
0
 def test_GetMyEmail_EqualMyEmail_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertEqual(obj.getMyEmail(), '*****@*****.**')
示例#10
0
 def test_GetMyName_EqualMyName_True(self):
     obj = FbBase(accessToken=TEST_TOKEN)
     self.assertEqual(obj.getMyName(), 'Kudo Chien')