Files
wget/testenv/conf/files_crawled.py
Zihang Chen 195393bf41 Create package conf where rules and hooks are put
create mode 100644 testenv/conf/__init__.py
 create mode 100644 testenv/conf/authentication.py
 create mode 100644 testenv/conf/expect_header.py
 create mode 100644 testenv/conf/expected_files.py
 create mode 100644 testenv/conf/expected_ret_code.py
 create mode 100644 testenv/conf/files_crawled.py
 create mode 100644 testenv/conf/hook_sample.py
 create mode 100644 testenv/conf/local_files.py
 create mode 100644 testenv/conf/reject_header.py
 create mode 100644 testenv/conf/response.py
 create mode 100644 testenv/conf/rule_sample.py
 create mode 100644 testenv/conf/send_header.py
 create mode 100644 testenv/conf/server_conf.py
 create mode 100644 testenv/conf/server_files.py
 create mode 100644 testenv/conf/urls.py
 create mode 100644 testenv/conf/wget_commands.py
2014-06-07 16:34:39 +02:00

19 lines
630 B
Python

from misc.colour_terminal import print_red
from conf import hook
from exc.test_failed import TestFailed
@hook()
class FilesCrawled:
def __init__(self, Request_Headers):
self.Request_Headers = Request_Headers
def __call__(self, test_obj):
for i in range (0, test_obj.servers):
headers = set(self.Request_Headers[i])
o_headers = test_obj.Request_remaining[i]
header_diff = headers.symmetric_difference (o_headers)
if len(header_diff) is not 0:
print_red(header_diff)
raise TestFailed ("Not all files were crawled correctly")