A command line (CLI) program for monitoring and downloading 8chan threads. Licensed under MIT.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_parse_url.py 495B

1234567891011121314151617
  1. from unittest import TestCase
  2. from lizard import db_methods
  3. class TestParse_url(TestCase):
  4. def test_parse_url(self):
  5. urls = {
  6. 'http://8ch.net/b/res/123.html#456': ['b', '123', '456'],
  7. 'https://8ch.net/b/res/123.html#456': ['b', '123', '456'],
  8. 'http://oxwugzccvk3dk6tj.onion/b/res/123.html#456': ['b', '123', '456']
  9. }
  10. for u in urls:
  11. result = db_methods.parse_url(u)
  12. self.assertListEqual(result, urls[u])