1from conf import hook 2 3""" Pre-Test Hook: LocalFiles 4This is a pre-test hook used to generate the specific environment before a test 5is run. The LocalFiles hook creates the files which should exist on disk before 6invoking Wget. 7""" 8 9 10@hook() 11class LocalFiles: 12 def __init__(self, local_files): 13 self.local_files = local_files 14 15 def __call__(self, _): 16 for f in self.local_files: 17 with open(f.name, 'w') as fp: 18 fp.write(f.content) 19