summaryrefslogtreecommitdiffstats
path: root/tests/core
diff options
context:
space:
mode:
authorAndrew Godwin2022-12-04 07:36:38 -0700
committerAndrew Godwin2022-12-04 07:36:38 -0700
commit8835fdee6b86118053840b69d49553b077d2d9f1 (patch)
tree0be51d1174ebb60459e708c598df24aedd0bf838 /tests/core
parent864b730164d5830a19eb0fdd93b95d696e08eaf9 (diff)
downloadtakahe-8835fdee6b86118053840b69d49553b077d2d9f1.tar.gz
takahe-8835fdee6b86118053840b69d49553b077d2d9f1.tar.bz2
takahe-8835fdee6b86118053840b69d49553b077d2d9f1.zip
Explicitly ignore add and remove messages for now
Diffstat (limited to 'tests/core')
-rw-r--r--tests/core/test_ld.py28
1 files changed, 28 insertions, 0 deletions
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,
+ )