@@ -828,6 +828,118 @@ def test_write_disposition_setter(self):
828828 config ._properties ["load" ]["writeDisposition" ], write_disposition
829829 )
830830
831+ def test_time_zone_missing (self ):
832+ config = self ._get_target_class ()()
833+ self .assertIsNone (config .time_zone )
834+
835+ def test_time_zone_hit (self ):
836+ time_zone = "UTC"
837+ config = self ._get_target_class ()()
838+ config ._properties ["load" ]["timeZone" ] = time_zone
839+ self .assertEqual (config .time_zone , time_zone )
840+
841+ def test_time_zone_setter (self ):
842+ time_zone = "America/New_York"
843+ config = self ._get_target_class ()()
844+ config .time_zone = time_zone
845+ self .assertEqual (config ._properties ["load" ]["timeZone" ], time_zone )
846+
847+ def test_date_format_missing (self ):
848+ config = self ._get_target_class ()()
849+ self .assertIsNone (config .date_format )
850+
851+ def test_date_format_hit (self ):
852+ date_format = "%Y-%m-%d"
853+ config = self ._get_target_class ()()
854+ config ._properties ["load" ]["dateFormat" ] = date_format
855+ self .assertEqual (config .date_format , date_format )
856+
857+ def test_date_format_setter (self ):
858+ date_format = "YYYY/MM/DD"
859+ config = self ._get_target_class ()()
860+ config .date_format = date_format
861+ self .assertEqual (config ._properties ["load" ]["dateFormat" ], date_format )
862+
863+ def test_datetime_format_missing (self ):
864+ config = self ._get_target_class ()()
865+ self .assertIsNone (config .datetime_format )
866+
867+ def test_datetime_format_hit (self ):
868+ datetime_format = "%Y-%m-%dT%H:%M:%S"
869+ config = self ._get_target_class ()()
870+ config ._properties ["load" ]["datetimeFormat" ] = datetime_format
871+ self .assertEqual (config .datetime_format , datetime_format )
872+
873+ def test_datetime_format_setter (self ):
874+ datetime_format = "YYYY/MM/DD HH24:MI:SS"
875+ config = self ._get_target_class ()()
876+ config .datetime_format = datetime_format
877+ self .assertEqual (config ._properties ["load" ]["datetimeFormat" ], datetime_format )
878+
879+ def test_time_format_missing (self ):
880+ config = self ._get_target_class ()()
881+ self .assertIsNone (config .time_format )
882+
883+ def test_time_format_hit (self ):
884+ time_format = "%H:%M:%S"
885+ config = self ._get_target_class ()()
886+ config ._properties ["load" ]["timeFormat" ] = time_format
887+ self .assertEqual (config .time_format , time_format )
888+
889+ def test_time_format_setter (self ):
890+ time_format = "HH24:MI:SS"
891+ config = self ._get_target_class ()()
892+ config .time_format = time_format
893+ self .assertEqual (config ._properties ["load" ]["timeFormat" ], time_format )
894+
895+ def test_timestamp_format_missing (self ):
896+ config = self ._get_target_class ()()
897+ self .assertIsNone (config .timestamp_format )
898+
899+ def test_timestamp_format_hit (self ):
900+ timestamp_format = "%Y-%m-%dT%H:%M:%S.%fZ"
901+ config = self ._get_target_class ()()
902+ config ._properties ["load" ]["timestampFormat" ] = timestamp_format
903+ self .assertEqual (config .timestamp_format , timestamp_format )
904+
905+ def test_timestamp_format_setter (self ):
906+ timestamp_format = "YYYY/MM/DD HH24:MI:SS.FF6 TZR"
907+ config = self ._get_target_class ()()
908+ config .timestamp_format = timestamp_format
909+ self .assertEqual (config ._properties ["load" ]["timestampFormat" ], timestamp_format )
910+
911+ def test_null_markers_missing (self ):
912+ config = self ._get_target_class ()()
913+ self .assertIsNone (config .null_markers )
914+
915+ def test_null_markers_hit (self ):
916+ null_markers = ["" , "NA" , "\\ N" ]
917+ config = self ._get_target_class ()()
918+ config ._properties ["load" ]["nullMarkers" ] = null_markers
919+ self .assertEqual (config .null_markers , null_markers )
920+
921+ def test_null_markers_setter (self ):
922+ null_markers = ["custom_null" ]
923+ config = self ._get_target_class ()()
924+ config .null_markers = null_markers
925+ self .assertEqual (config ._properties ["load" ]["nullMarkers" ], null_markers )
926+
927+ def test_source_column_name_match_option_missing (self ):
928+ config = self ._get_target_class ()()
929+ self .assertIsNone (config .source_column_name_match_option )
930+
931+ def test_source_column_name_match_option_hit (self ):
932+ option = "MATCH_BY_NAME"
933+ config = self ._get_target_class ()()
934+ config ._properties ["load" ]["sourceColumnMatch" ] = option
935+ self .assertEqual (config .source_column_name_match_option , option )
936+
937+ def test_source_column_name_match_option_setter (self ):
938+ option = "MATCH_BY_POSITION"
939+ config = self ._get_target_class ()()
940+ config .source_column_name_match_option = option
941+ self .assertEqual (config ._properties ["load" ]["sourceColumnMatch" ], option )
942+
831943 def test_parquet_options_missing (self ):
832944 config = self ._get_target_class ()()
833945 self .assertIsNone (config .parquet_options )
0 commit comments