Skip to content

Commit 2d0f030

Browse files
Modifying unit tests
Signed-off-by: Mohit Singla <[email protected]>
1 parent d726a0d commit 2d0f030

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/unit/test_thrift_backend.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ def test_create_arrow_table_raises_error_for_unsupported_type(self):
828828
t_row_set = ttypes.TRowSet()
829829
thrift_backend = ThriftBackend("foobar", 443, "path", [])
830830
with self.assertRaises(OperationalError):
831-
thrift_backend._create_arrow_table(t_row_set, None, Mock())
831+
thrift_backend._create_arrow_table(t_row_set, Mock(), None, Mock())
832832

833833
@patch.object(ThriftBackend, "_convert_arrow_based_set_to_arrow_table")
834834
@patch.object(ThriftBackend, "_convert_column_based_set_to_arrow_table")
@@ -841,16 +841,17 @@ def test_create_arrow_table_calls_correct_conversion_method(self, convert_col_mo
841841
schema = Mock()
842842
cols = Mock()
843843
arrow_batches = Mock()
844+
are_arrow_results_compressed = Mock()
844845
description = Mock()
845846

846847
t_col_set = ttypes.TRowSet(columns=cols)
847-
thrift_backend._create_arrow_table(t_col_set, schema, description)
848+
thrift_backend._create_arrow_table(t_col_set, are_arrow_results_compressed, schema, description)
848849
convert_arrow_mock.assert_not_called()
849850
convert_col_mock.assert_called_once_with(cols, description)
850851

851852
t_arrow_set = ttypes.TRowSet(arrowBatches=arrow_batches)
852-
thrift_backend._create_arrow_table(t_arrow_set, schema, Mock())
853-
convert_arrow_mock.assert_called_once_with(arrow_batches, schema)
853+
thrift_backend._create_arrow_table(t_arrow_set, are_arrow_results_compressed, schema, Mock())
854+
convert_arrow_mock.assert_called_once_with(arrow_batches, are_arrow_results_compressed, schema)
854855

855856
def test_convert_column_based_set_to_arrow_table_without_nulls(self):
856857
# Deliberately duplicate the column name to check that dups work

0 commit comments

Comments
 (0)