implement support for additional unit test result types

- "pattern" matches all resulting URLs against the given regex
- "count" allows to specify the amount of returned URLs
This commit is contained in:
Mike Fährmann
2017-08-25 22:01:14 +02:00
parent 2d0dfe9d56
commit 47bcf53ec1
6 changed files with 20 additions and 10 deletions

View File

@@ -244,6 +244,7 @@ class TestJob(DownloadJob):
def __init__(self, url, content=False):
DownloadJob.__init__(self, url)
self.content = content
self.urllist = []
self.hash_url = hashlib.sha1()
self.hash_keyword = hashlib.sha1()
self.hash_content = hashlib.sha1()
@@ -267,6 +268,7 @@ class TestJob(DownloadJob):
def update_url(self, url):
"""Update the URL hash"""
self.urllist.append(url)
self.hash_url.update(url.encode())
def update_keyword(self, kwdict):