Example #1
0
 def testSyncTumblrWithCache(self):
     tumblrPosts.setOverrideTTL(0)
     models.Post.objects.all().delete()
     remotePosts = tumblrPosts.remotePosts(tumblrAPI)
     tumblrPosts.syncLocalPostsWith(remotePosts)
     localPosts = tumblrPosts.localPosts()
     self.assertTrue(tumblrPosts.isCacheSynced(localItems=localPosts, remoteItems=remotePosts))
Example #2
0
 def testSaveTumblrPostToCache(self):
     post = tumblrPosts.remotePosts(tumblrAPI)[0]
     models.Post.TumblrPostToCache(post)
Example #3
0
 def testRetrieveFromTumblr(self):
     self.assertTrue(type(tumblrPosts.remotePosts(tumblrAPI)[0]['unix-timestamp'])==type(1.0))