Exemplo n.º 1
0
 def test_lab_rows_obtained_from_files(self):
     lab_rows = get_labelled_rows(raw_data_file=self.csvfile(),
                                  spec_file=self.specfile(),
                                  cfg_file=None)
     self.assertEqual(lab_rows, self.INVESTMENT_PARSED)
     self.file_cleanup()
Exemplo n.º 2
0
def test_lab_rows_obtained_from_files():
    lab_rows = get_labelled_rows(raw_data_file=csvfile(), spec_file=specfile(), cfg_file=None)
    assert lab_rows == INVESTMENT_PARSED
    file_cleanup()
Exemplo n.º 3
0
def test_lab_rows_obtained_from_files():
    lab_rows = get_labelled_rows(raw_data_file=csvfile(),
                                 spec_file=specfile(),
                                 cfg_file=None)
    assert lab_rows == INVESTMENT_PARSED
    file_cleanup()
Exemplo n.º 4
0
def test_label_csv2(raw_data_file, spec_file, cfg_file, data_as_list):
    assert data_as_list == get_labelled_rows(raw_data_file, spec_file,
                                             cfg_file)
Exemplo n.º 5
0
 def test_label_csv2(self):
     self.assertEqual(
         data_as_list(),
         get_labelled_rows(raw_data_file(), spec_file(), cfg_file()))
Exemplo n.º 6
0
def to_database(raw_data_file, spec_file, cfg_file=None):
    lab_rows = get_labelled_rows(raw_data_file, spec_file, cfg_file)
    db_rows = stream_flat_data(lab_rows)
    stream_to_database(db_rows)
Exemplo n.º 7
0
 def test_label_csv2(self):
     self.assertEqual(data_as_list(), get_labelled_rows(raw_data_file(), spec_file(), cfg_file()))
Exemplo n.º 8
0
def labelled_rows(raw_data_file, spec_file, cfg_file):
    return get_labelled_rows(raw_data_file, spec_file, cfg_file)
Exemplo n.º 9
0
def to_database(raw_data_file, spec_file, cfg_file = None):
    lab_rows = get_labelled_rows(raw_data_file, spec_file, cfg_file)
    db_rows = stream_flat_data(lab_rows)
    stream_to_database(db_rows)
Exemplo n.º 10
0
def test_label_csv2(raw_data_file, spec_file, cfg_file, data_as_list):
    assert data_as_list == get_labelled_rows(raw_data_file, spec_file, cfg_file)
Exemplo n.º 11
0
def test_lab_rows():
    csv, spec, cfg = get_filenames(CURRENT_MONTH_DATA_FOLDER)
    lab_rows = get_labelled_rows(csv, spec, cfg)
    assert row_exists('PROD_AUTO_TRUCKS_AND_CHASSIS', lab_rows)
Exemplo n.º 12
0
 def test_lab_rows(self):
     csv, spec, cfg = get_filenames(DATA_FOLDER)
     lab_rows = get_labelled_rows(csv, spec, cfg)
     self.assertTrue(
         TestLabRows.row_exists('PROD_AUTO_TRUCKS_AND_CHASSIS', lab_rows))
Exemplo n.º 13
0
def labelled_rows(raw_data_file, spec_file, cfg_file):
    return get_labelled_rows(raw_data_file, spec_file, cfg_file)
Exemplo n.º 14
0
 def test_lab_rows(self):
     csv, spec, cfg = get_filenames(DATA_FOLDER)
     lab_rows = get_labelled_rows(csv, spec, cfg)
     self.assertTrue(TestLabRows.row_exists('PROD_AUTO_TRUCKS_AND_CHASSIS', lab_rows))
Exemplo n.º 15
0
 def test_lab_rows_obtained_from_files(self):
     lab_rows = get_labelled_rows(raw_data_file=self.csvfile(), spec_file=self.specfile(), cfg_file=None)
     self.assertEqual(lab_rows, self.INVESTMENT_PARSED)
     self.file_cleanup()
Exemplo n.º 16
0
def test_lab_rows():
    csv, spec, cfg = get_filenames(CURRENT_MONTH_DATA_FOLDER)
    lab_rows = get_labelled_rows(csv, spec, cfg)
    assert row_exists("PROD_AUTO_TRUCKS_AND_CHASSIS", lab_rows)