Esempio n. 1
0
    def setup_test_environment(self, **kwargs):
        #configure windmill
        admin_lib.configure_global_settings(logging_on=False)
        windmill.settings['shell_objects'] = self.windmill_cmds
        
        self.windmill_cmds['httpd'], self.windmill_cmds['httpd_thread'] = \
            admin_lib.run_threaded(windmill.settings['CONSOLE_LOG_LEVEL'])

        from windmill.bin import shell_objects
        for attribute in dir(shell_objects):
            self.windmill_cmds[attribute] = getattr(shell_objects, attribute)

        self.windmill_cmds['setup_has_run'] = True

        # firefox 4.0 compatibiliy hack
        if 'MOZILLA_DEFAULT_PROFILE' not in windmill.settings:
            tmp_profile = tempfile.mkdtemp(suffix='.mozrunner')
            windmill.settings['MOZILLA_DEFAULT_PROFILE']= tmp_profile

        #run wsgi django server
        self.server_thread = TestServerThread((self.test_server_host, self.test_server_port))
        self.server_thread.start()
        self.server_thread.started.wait()
        if self.server_thread.error:
            raise self.server_thread.error
    def setup_test_environment(self, **kwargs):
        #configure windmill
        admin_lib.configure_global_settings(logging_on=False)
        windmill.settings['shell_objects'] = self.windmill_cmds

        self.windmill_cmds['httpd'], self.windmill_cmds['httpd_thread'] = \
            admin_lib.run_threaded(windmill.settings['CONSOLE_LOG_LEVEL'])

        from windmill.bin import shell_objects
        for attribute in dir(shell_objects):
            self.windmill_cmds[attribute] = getattr(shell_objects, attribute)

        self.windmill_cmds['setup_has_run'] = True

        # firefox 4.0 compatibiliy hack
        if 'MOZILLA_DEFAULT_PROFILE' not in windmill.settings:
            tmp_profile = tempfile.mkdtemp(suffix='.mozrunner')
            windmill.settings['MOZILLA_DEFAULT_PROFILE'] = tmp_profile

        #run wsgi django server
        self.server_thread = TestServerThread(
            (self.test_server_host, self.test_server_port))
        self.server_thread.start()
        self.server_thread.started.wait()
        if self.server_thread.error:
            raise self.server_thread.error
Esempio n. 3
0
    def setup_test_environment(self, **kwargs):
        #configure windmill
        admin_lib.configure_global_settings(logging_on=False)
        windmill.settings['shell_objects'] = self.windmill_cmds

        self.windmill_cmds['httpd'], self.windmill_cmds['httpd_thread'] = \
            admin_lib.run_threaded(windmill.settings['CONSOLE_LOG_LEVEL'])

        from windmill.bin import shell_objects
        for attribute in dir(shell_objects):
            self.windmill_cmds[attribute] = getattr(shell_objects, attribute)

        self.windmill_cmds['setup_has_run'] = True

        #run wsgi django server
        self.server_thread = TestServerThread((self.test_server_host, self.test_server_port))
        self.server_thread.start()
        self.server_thread.started.wait()
        if self.server_thread.error:
            raise self.server_thread.error
Esempio n. 4
0
    def setup_test_environment(self, **kwargs):
        #configure windmill
        admin_lib.configure_global_settings(logging_on=False)
        windmill.settings['shell_objects'] = self.windmill_cmds

        self.windmill_cmds['httpd'], self.windmill_cmds['httpd_thread'] = \
            admin_lib.run_threaded(windmill.settings['CONSOLE_LOG_LEVEL'])

        from windmill.bin import shell_objects
        for attribute in dir(shell_objects):
            self.windmill_cmds[attribute] = getattr(shell_objects, attribute)

        self.windmill_cmds['setup_has_run'] = True

        #run wsgi django server
        self.server_thread = TestServerThread(
            (self.test_server_host, self.test_server_port))
        self.server_thread.start()
        self.server_thread.started.wait()
        if self.server_thread.error:
            raise self.server_thread.error