Exemplo n.º 1
0
    def test_ingest_good_data_all_rows_ingested(self):

        expected_rows = len(GOOD_DATA.split(sep='\n'))
        files = ingest_files(self.sensormap, self.good_data)

        self.assertIsNotNone(files, "ingest_files returned none value")
        rowcount = 1
        for fileIngest in files:
            self.assertIsNotNone(fileIngest)
            self.assertEqual(4, len(fileIngest.sensors))

            for row in fileIngest.rows:
                for col in row.columns:
                    self.assertFalse(isinstance(col, IngestError), "The column had an error!")

                rowcount += 1
        # Returns 1 based numbering from where the data actually starts.
        self.assertEqual(expected_rows, rowcount, 'Invalid rowcount.')
Exemplo n.º 2
0
 def test_save_good_data(self):
     expected_rows = len(ERROR_DATA.split(sep='\n')) - 1
     files = ingest_files(self.datamap, self.error_data)