Skip to content

Commit

Permalink
Add extra test case to exercise the google cal {"date": "2021-11-14"}…
Browse files Browse the repository at this point in the history
… format
  • Loading branch information
bergercookie committed Aug 15, 2024
1 parent a6b5159 commit c32762c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion tests/test_google_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,23 @@ def test_parse_datetime():
)
assert_dt(
dt_given={"dateTime": "2021-11-14T22:07:49.123456"},
dt_expected=datetime.datetime(2021, 11, 14, 22, 7, 49, 123456, tzinfo=localzone),
dt_expected=datetime.datetime(
2021,
11,
14,
22,
7,
49,
123456,
tzinfo=localzone,
),
)
assert_dt(
dt_given={"dateTime": "2021-11-14T22:07:49Z", "timeZone": "Europe/London"},
dt_expected=datetime.datetime(2021, 11, 14, 22, 7, 49, tzinfo=tzutc()),
)

assert_dt(
dt_given={"date": "2021-11-14"},
dt_expected=datetime.datetime(2021, 11, 14, 0, 0, 0, tzinfo=localzone),
)

0 comments on commit c32762c

Please sign in to comment.