Files
wget/testenv/conf/server_files.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
645 B
Python

from conf import hook
@hook()
class ServerFiles:
def __init__(self, server_files):
self.server_files = server_files
def __call__(self, test_obj):
for i in range (0, test_obj.servers):
file_list = dict ()
server_rules = dict ()
for file_obj in self.server_files[i]:
content = test_obj._replace_substring (file_obj.content)
file_list[file_obj.name] = content
rule_obj = test_obj.get_server_rules (file_obj)
server_rules[file_obj.name] = rule_obj
test_obj.server_list[i].server_conf (file_list, server_rules)