Feed date scraper for Gemini (protocol)
test: test that it only parses link lines
Zach DeCook 2021-02-07
parent 77651cc · commit 5a0ebe1
-rwxr-xr-xtest_zachwalk.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/test_zachwalk.py b/test_zachwalk.py
index 5ed323e..952ad65 100755
--- a/test_zachwalk.py
+++ b/test_zachwalk.py
@@ -1,8 +1,11 @@
#!/usr/bin/env python3
import zachwalk
+from dateutil.parser import parse
def main():
assert zachwalk.gnd([b'']) == zachwalk.DEFAULT
+ assert zachwalk.gnd([b'2021-01-31']) == zachwalk.DEFAULT
+ assert zachwalk.gnd([b'=> path.gmi 2021-01-31 - my post']) == parse('2021-01-31').date()
if __name__ == '__main__':
main()