Feed date scraper for Gemini (protocol)
test: test that it only parses link lines
| -rwxr-xr-x | test_zachwalk.py | 3 |
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() |