From 8835fdee6b86118053840b69d49553b077d2d9f1 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Sun, 4 Dec 2022 07:36:38 -0700 Subject: Explicitly ignore add and remove messages for now --- tests/core/test_ld.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/core/test_ld.py (limited to 'tests/core') diff --git a/tests/core/test_ld.py b/tests/core/test_ld.py new file mode 100644 index 0000000..bb465e1 --- /dev/null +++ b/tests/core/test_ld.py @@ -0,0 +1,28 @@ +import datetime + +from core.ld import parse_ld_date + + +def test_parse_ld_date(): + """ + Tests that the various kinds of LD dates that we see will work + """ + assert parse_ld_date("2022-11-16T15:57:58Z") == datetime.datetime( + 2022, + 11, + 16, + 15, + 57, + 58, + tzinfo=datetime.timezone.utc, + ) + + assert parse_ld_date("2022-11-16T15:57:58.123Z") == datetime.datetime( + 2022, + 11, + 16, + 15, + 57, + 58, + tzinfo=datetime.timezone.utc, + ) -- cgit v1.2.3