def test_row_contains_relevant_data_is_false(self): values = ["", "", "c3"] relevant_indices = [0, 1] self.assertFalse( Helpers.row_contains_relevant_data(values, relevant_indices))
def test_is_row_empty_with_full_row(self): values = [" ", "", " ", "somevaluehere"] self.assertFalse(Helpers.is_row_empty(values))
def test_is_row_empty_with_empty_row(self): values = [" ", "", " "] self.assertTrue(Helpers.is_row_empty(values))
def test_row_contains_relevant_data(self): values = ["c1", "c2", "c3"] relevant_indices = [2] self.assertTrue(Helpers.row_contains_relevant_data(values, relevant_indices))
def teardown(self) -> None: drive_client = Helpers.get_authenticated_drive_client( self._get_creds(), SCOPES) drive_client.files().delete( fileId=self._get_spreadsheet_id()).execute() shutil.rmtree(self._get_tmp_dir(), ignore_errors=True)
def test_duplicate_headers_to_ab_stream_fails(self): sheet_name = "sheet1" header_values = ["h1", "h1", "h3"] with self.assertRaises(BaseException): Helpers.headers_to_airbyte_stream(sheet_name, header_values)