Exemplo n.º 1
0
 def _create_temp_config_module_files(self,
                                      ports,
                                      tmpdir,
                                      file_extension=".py"):
     for port in ports:
         file = tmpdir.join(
             generate_config_module_name(port, file_extension))
         file.write("PORT = 8001")
Exemplo n.º 2
0
    def _create_temp_config_module_files(self, ports, tmpdir, file_extension=".py",
                                         client_attribute="{}"):
        if not isinstance(tmpdir, basestring):
            tmpdir = str(tmpdir)

        for port in ports:
            path = os.path.join(tmpdir, generate_config_module_name(port, file_extension))
            with open(path, "w", 0) as file:
                file.write("PORT = 8001\n"
                           "BASE ='http://localhost'\n"
                           "CLIENT = " + client_attribute)
        sslconf_path = os.path.join(tmpdir, "sslconf.py")
        with open(sslconf_path, "w", 0) as sslconf_file:
            sslconf_file.write("")
        sys.path.append(tmpdir)
Exemplo n.º 3
0
 def ps_output(self, port, pid=100552):
     out = "87552 ttys001    0:00.12 login -pf danielevertsson \n" + \
           str(pid) + " ttys000    0:00.17 server " + generate_config_module_name(port) +\
           "\n87553 ttys001    0:00.07 -bash \n"
     return out
Exemplo n.º 4
0
 def ps_output(self, port, pid=100552):
     out = "87552 ttys001    0:00.12 login -pf danielevertsson \n" + \
           str(pid) + " ttys000    0:00.17 server " + generate_config_module_name(port) +\
           "\n87553 ttys001    0:00.07 -bash \n"
     return out