示例#1
0
 def test_second_dict(self):
     """"This checks currenc parcel info"""
     web_parser = WebParser(governmax_api_key)
     web_parser.getSoup(property_pin)
     data = web_parser.getCurrentParcelInfo()
     print data
     self.assertEqual(data['Owner'], 'WILLIAMS VALERIA H')
示例#2
0
 def test_connection_county(self):
     """This is to test the connection with governmax."""
     web_parser = WebParser(governmax_api_key)
     web_parser.getSoup(property_pin)
     overview = web_parser.getOverview()
     self.assertEqual(overview['Parcel Address'],
                      '5345 HALFWAY CREEK RD, MC CLELLANVILLE')
示例#3
0
 def test_read_query(self):
     """This is to test the connection with governmax."""
     Governmax = WebParser(governmax_api_key)
     Governmax.writeAndQuery('test', exportPath='../data/governmax-2012.csv')
示例#4
0
 def test_write_to_filed(self):
     web_parser = WebParser(governmax_api_key)
     web_parser.writeAndQuery('test', '../data/test.csv')
     data_dict = [x for x in csv.DictReader(open('../data/test.csv'))]
     self.assertEqual(data_dict[0]['lowestSalesValue'], '0.0')
示例#5
0
 def test_aggregate(self):
     web_parser = WebParser(governmax_api_key)
     web_parser.getSoup(property_pin)
     data = web_parser.aggregateData('2013')
     self.assertEqual(data['lowestSalesValue'], 0.0)
示例#6
0
 def test_get_improvements(self):
     """"This checks historic parcel info"""
     web_parser = WebParser(governmax_api_key)
     web_parser.getSoup(property_pin)
     data = web_parser.getImprovements()
     self.assertEqual(data[0]['Finished Sq. Ft.'], '')
示例#7
0
 def test_sales_disclosure(self):
     """"This checks historic parcel info"""
     web_parser = WebParser(governmax_api_key)
     web_parser.getSoup(property_pin)
     data = web_parser.getSalesDisclosure()
     self.assertEqual(data[0]['Date'], '8/15/2006')
示例#8
0
 def test_historic_information(self):
     """"This checks historic parcel info"""
     web_parser = WebParser(governmax_api_key)
     web_parser.getSoup(property_pin)
     data = web_parser.getHistoricInformation()
     self.assertEqual(data[0]['Land'], '$10,000')