mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-16 20:31:01 +00:00
s/fields/parts/ for logger arguments, and supporess the last modified info
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@3424 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
220b1da8e8
commit
f78d9bb337
1 changed files with 5 additions and 4 deletions
|
|
@ -73,7 +73,8 @@ class TestLogger (linkcheck.logger.Logger):
|
|||
self.result.append(u"baseurl %s" % url_data.base_ref)
|
||||
if self.has_part('info'):
|
||||
for info in url_data.info:
|
||||
self.result.append(u"info %s" % info[1])
|
||||
if "Last modified" not in info[1]:
|
||||
self.result.append(u"info %s" % info[1])
|
||||
if self.has_part('warning'):
|
||||
for warning in url_data.warnings:
|
||||
self.result.append(u"warning %s" % warning[1])
|
||||
|
|
@ -188,7 +189,7 @@ class LinkCheckTest (unittest.TestCase):
|
|||
l = sep.join(l)
|
||||
self.fail(l.encode("iso8859-1", "ignore"))
|
||||
|
||||
def direct (self, url, resultlines, fields=None, recursionlevel=0,
|
||||
def direct (self, url, resultlines, parts=None, recursionlevel=0,
|
||||
confargs=None, assume_local=False):
|
||||
"""
|
||||
Check url with expected result.
|
||||
|
|
@ -199,8 +200,8 @@ class LinkCheckTest (unittest.TestCase):
|
|||
else:
|
||||
confargs['recursionlevel'] = recursionlevel
|
||||
logargs = {'expected': resultlines}
|
||||
if fields is not None:
|
||||
logargs['fields'] = fields
|
||||
if parts is not None:
|
||||
logargs['parts'] = parts
|
||||
aggregate = get_test_aggregate(confargs, logargs)
|
||||
url_data = linkcheck.checker.get_url_from(
|
||||
url, 0, aggregate, assume_local=assume_local)
|
||||
|
|
|
|||
Loading…
Reference in a new issue