def __init__(self, web_server, html):
     self.web_server = web_server
     self.tmp_file   = Misc.random_filename('html')
     self.file_path  = self.web_server.path_to_file(self.tmp_file)
     self.html       = html
示例#2
0
 def test_random_filename(self):
     result = Misc.random_filename()
     assert len(result) is 14
     assert ".tmp" in result
示例#3
0
 def __init__(self, contents='...', extension='tmp'):
     self.tmp_file = Misc.random_filename(extension)
     self.tmp_folder = tempfile.tempdir
     self.file_path = Files.path_combine(self.tmp_folder, self.tmp_file)
     self.contents = contents