Ejemplo n.º 1
0
 def testFileConnector(self):
     data = {}
     model = "trip_review_detail"
     webconfigs = config.load_pages("../config/tripadvisor.json")
     web_config = config.get_model_config(webconfigs, model)
     test_page = "http://www.tripadvisor.com.sg/ShowUserReviews-g294265-d2516429-r165190313-Auld_Alliance-Singapore.html#REVIEWS"
     html = urllib2.urlopen(test_page).read()
     data, links = parser.parse_page(html, web_config)
     for edata in data:
         database.save_data(edata, web_config["model"], web_config)
     self.assertEqual(1, 1)
     self.assertTrue(True)