Skip to content

Commit c32762c

Browse files
committed
Add extra test case to exercise the google cal {"date": "2021-11-14"} format
1 parent a6b5159 commit c32762c

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

tests/test_google_common.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,23 @@ def test_parse_datetime():
4242
)
4343
assert_dt(
4444
dt_given={"dateTime": "2021-11-14T22:07:49.123456"},
45-
dt_expected=datetime.datetime(2021, 11, 14, 22, 7, 49, 123456, tzinfo=localzone),
45+
dt_expected=datetime.datetime(
46+
2021,
47+
11,
48+
14,
49+
22,
50+
7,
51+
49,
52+
123456,
53+
tzinfo=localzone,
54+
),
4655
)
4756
assert_dt(
4857
dt_given={"dateTime": "2021-11-14T22:07:49Z", "timeZone": "Europe/London"},
4958
dt_expected=datetime.datetime(2021, 11, 14, 22, 7, 49, tzinfo=tzutc()),
5059
)
60+
61+
assert_dt(
62+
dt_given={"date": "2021-11-14"},
63+
dt_expected=datetime.datetime(2021, 11, 14, 0, 0, 0, tzinfo=localzone),
64+
)

0 commit comments

Comments
 (0)