示例#1
0
 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))
示例#2
0
    def test_is_row_empty_with_full_row(self):
        values = [" ", "", "     ", "somevaluehere"]

        self.assertFalse(Helpers.is_row_empty(values))
示例#3
0
    def test_is_row_empty_with_empty_row(self):
        values = [" ", "", "     "]

        self.assertTrue(Helpers.is_row_empty(values))
示例#4
0
 def test_row_contains_relevant_data(self):
     values = ["c1", "c2", "c3"]
     relevant_indices = [2]
     self.assertTrue(Helpers.row_contains_relevant_data(values, relevant_indices))
示例#5
0
 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)
示例#6
0
 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)