示例#1
0
 def test_getData_MULTIPLE_DATA(self):
     obj = FourSquareExporter(accessToken=TEST_TOKEN)
     currDatetime = datetime.datetime.now()
     tendayBefore = currDatetime - datetime.timedelta(10)
     ret = obj.getData(since=currDatetime, until=tendayBefore)
     self.assertIsNotNone(ret)
     self.assertTrue(ret['count'] > 0)
     self.assertTrue(len(ret['data']) > 0)
     self.assertEqual(ret['retCode'], ErrorCode.S_OK)
示例#2
0
 def test_getData_MULTIPLE_DATA(self):
     obj = FourSquareExporter(accessToken=TEST_TOKEN)
     currDatetime = datetime.datetime.now()
     tendayBefore = currDatetime - datetime.timedelta(10)
     ret = obj.getData(since=currDatetime, until=tendayBefore)
     self.assertIsNotNone(ret)
     self.assertTrue(ret['count'] > 0)
     self.assertTrue(len(ret['data']) > 0)
     self.assertEqual(ret['retCode'], ErrorCode.S_OK)
示例#3
0
 def test_getData_E_NO_DATA(self):
     obj = FourSquareExporter(accessToken=TEST_TOKEN)
     currDatetime = datetime.datetime(2008, 11, 11)
     tendayBefore = currDatetime - datetime.timedelta(1)
     ret = obj.getData(since=currDatetime, until=tendayBefore)
     self.assertEqual(ret['retCode'], ErrorCode.E_NO_DATA)
示例#4
0
 def test_getData_E_NO_DATA(self):
     obj = FourSquareExporter(accessToken=TEST_TOKEN)
     currDatetime = datetime.datetime(2008, 11, 11)
     tendayBefore = currDatetime - datetime.timedelta(1)
     ret = obj.getData(since=currDatetime, until=tendayBefore)
     self.assertEqual(ret['retCode'], ErrorCode.E_NO_DATA)