Skip to content

Commit 2a4e7e4

Browse files
committed
fix test
1 parent f2584c8 commit 2a4e7e4

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

unit_tests/sources/declarative/interpolation/test_macros.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,25 +123,26 @@ def test_utc_datetime_to_local_timestamp_conversion():
123123

124124

125125
@pytest.mark.parametrize(
126-
"test_name, input_value, input_format, expected_output",
126+
"test_name, input_value, expected_output",
127127
[
128-
("test_basic_date", "2022-01-01", "%Y-%m-%d", datetime.datetime(2022, 1, 1)),
128+
(
129+
"test_basic_date",
130+
"2022-01-14",
131+
datetime.datetime(2022, 1, 14, tzinfo=datetime.timezone.utc),
132+
),
129133
(
130134
"test_datetime_with_time",
131135
"2022-01-01 13:45:30",
132-
"%Y-%m-%d %H:%M:%S",
133-
datetime.datetime(2022, 1, 1, 13, 45, 30),
136+
datetime.datetime(2022, 1, 1, 13, 45, 30, tzinfo=datetime.timezone.utc),
134137
),
135138
(
136139
"test_datetime_with_timezone",
137140
"2022-01-01T13:45:30+00:00",
138-
"%Y-%m-%dT%H:%M:%S%z",
139141
datetime.datetime(2022, 1, 1, 13, 45, 30, tzinfo=datetime.timezone.utc),
140142
),
141-
("test_datetime_custom_format", "01/Jan/2022", "%d/%b/%Y", datetime.datetime(2022, 1, 1)),
142143
],
143144
)
144-
def test_str_to_datetime(test_name, input_value, input_format, expected_output):
145+
def test_str_to_datetime(test_name, input_value, expected_output):
145146
str_to_datetime_fn = macros["str_to_datetime"]
146-
actual_output = str_to_datetime_fn(input_value, input_format)
147+
actual_output = str_to_datetime_fn(input_value)
147148
assert actual_output == expected_output

0 commit comments

Comments
 (0)