Skip to content

Commit

Permalink
Issue #26: Extract dates and match different date files (test line ex…
Browse files Browse the repository at this point in the history
…tra)
  • Loading branch information
Nekmo committed Sep 26, 2018
1 parent b407ff3 commit 30dc15e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions dirhunt/tests/test_url_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,20 @@ def test_multi_line(self):
self._test_get_data(html, url_info)
self.assertIn(self.url, url_info.multi_line(30, 0))

def test_one_line_extra(self):
html = '<html><title>Foo</title></html>'
url_info = self._get_url_info()
self._test_get_data(html, url_info)
url_info.url.add_extra({'created_at': 'foo'})
self.assertIn('[foo ]', url_info.one_line(200, len(self.url), 6))

def test_multi_line_extra(self):
html = '<html><title>Foo</title></html>'
url_info = self._get_url_info()
self._test_get_data(html, url_info)
url_info.url.add_extra({'created_at': 'foo'})
self.assertIn('[foo ]', url_info.multi_line(30, 6))


class TestUrlsInfo(unittest.TestCase):
url = 'https://domain.com/foo.php'
Expand Down

0 comments on commit 30dc15e

Please sign in to comment.