File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4559,8 +4559,9 @@ def test_save_empty_dataframe(self, mocker):
4559
4559
mock_spark_engine_save_dataframe = mocker .patch (
4560
4560
"hsfs.engine.spark.Engine.save_dataframe"
4561
4561
)
4562
- mock_spark_format = mocker .Mock ()
4563
- mocker .patch ("pyspark.sql.session.SparkSession.read" , return_value = mock_spark_format )
4562
+ mock_spark_read = mocker .patch ("pyspark.sql.session.SparkSession.read" )
4563
+ mock_spark_read_format = mock_spark_read .return_value .format
4564
+ mock_spark_read_format .return_value = mocker .Mock ()
4564
4565
4565
4566
# Arrange
4566
4567
spark_engine = spark .Engine ()
@@ -4580,7 +4581,7 @@ def test_save_empty_dataframe(self, mocker):
4580
4581
4581
4582
# Assert
4582
4583
assert mock_spark_engine_save_dataframe .call_count == 1
4583
- assert mock_spark_format .call_count == 1
4584
+ assert mock_spark_read_format .call_count == 1
4584
4585
4585
4586
def test_apply_transformation_function_single_output (self , mocker ):
4586
4587
# Arrange
You can’t perform that action at this time.
0 commit comments