def testUserInfoParserForSite(self): test_uid = '2733272463' test_url = 'http://weibo.com/%s/info' % test_uid bundle = WeiboUserBundle(test_uid) parser = UserInfoParser(opener=self.opener, url=test_url, bundle=bundle) parser.parse()
def testUserInfoParser(self): test_url = 'http://weibo.com/%s/info' % self.test_uid parser = UserInfoParser(opener=self.opener, url=test_url, bundle=self.bundle) parser.parse() user = self.collection.find_one({'uid': self.test_uid}) self.assertTrue('info' in user)
def testUserInfoParser(self): test_url = 'http://weibo.com/%s/info' % self.test_uid parser = UserInfoParser(opener=self.opener, url=test_url, bundle=self.bundle) parser.parse() user = self.users_collection.find_one({'uid': self.test_uid}) self.assertTrue('info' in user)