def post_update_linkedin(entry_id): """ count linkedin """ result = (-1, ) if not entry_id: logger.error("Provided an invalid post_id") return result if getattr(settings, 'FEEDS_POST_UPDATE_LINKEDIN', False): post = Post.objects.get(pk=entry_id) (post.linkedin, ) = linkedin(post) post.save() logger.debug( "stop: counting linkedin. got %s", post.linkedin ) return (post.linkedin, ) return result
def test_linkedin(self): from social.get import linkedin result = linkedin("http://neumeier.org") self.assertEqual(type(()), type(result))