Exemplo n.º 1
0
 def test_print_incomes(self):
     csv_exporter.print_incomes(self.documents, self.mock_printer)
     self.assertEqual(self.print_trace[0], 'postal_code,total,mean,median,lowest_income,middle_income,highest_income,accumulated_purchasing_power')
     self.assertEqual(self.print_trace[1], '00510,1000,100,200,300,400,500,6000')
Exemplo n.º 2
0
def fetch_incomes(file_path):
    df = read_csv(file_path)
    documents = read_csv_to_documents(df, parser.parse_income_row)
    exporter.print_incomes(documents, printer)
    db_access.insert_incomes(documents)
Exemplo n.º 3
0
def load_and_print_incomes():
    incomes = db_access.get_incomes()
    exporter.print_incomes(incomes, printer)