Exemplo n.º 1
0
def run_test(name, args):
    context_config = store_context()
    actions.reset_base_url()
    actions.set_wait_timeout(10, 0.1)

    try:
        return _execute_test(name, args)
    finally:
        restore_context(context_config)
Exemplo n.º 2
0
def run_test(name, args):
    context_config = store_context()
    actions.reset_base_url()
    actions.set_wait_timeout(10, 0.1)

    try:
        return _execute_test(name, args)
    finally:
        restore_context(context_config)
Exemplo n.º 3
0
 def setUp(self):
     self._compile_script()
     # The script may override some settings. The default value for
     # ASSUME_TRUSTED_CERT_ISSUER is False, so if the user mentions it
     # in his script, it's to turn them on. Also, getting our hands on
     # the values used in the script is too hackish.
     if 'ASSUME_TRUSTED_CERT_ISSUER' in self.code.co_names:
         self.assume_trusted_cert_issuer = True
     super(SSTScriptTestCase, self).setUp()
     # Start with default values
     actions.reset_base_url()
     actions._set_wait_timeout(10, 0.1)
     # Possibly inject parametrization from associated .csv file
     previous_context = context.store_context()
     self.addCleanup(context.restore_context, previous_context)
     context.populate_context(self.context, self.script_path,
                              self.browser.name)
 def setUp(self):
     self.script_path = os.path.join(self.script_dir, self.script_name)
     sys.path.append(self.script_dir)
     self.addCleanup(sys.path.remove, self.script_dir)
     self._compile_script()
     # The script may override some settings. The default value for
     # JAVASCRIPT_DISABLED and ASSUME_TRUSTED_CERT_ISSUER are False, so if
     # the user mentions them in his script, it's to turn them on. Also,
     # getting our hands on the values used in the script is too hackish ;)
     if 'JAVASCRIPT_DISABLED' in self.code.co_names:
         self.javascript_disabled = True
     if 'ASSUME_TRUSTED_CERT_ISSUER' in self.code.co_names:
         self.assume_trusted_cert_issuer = True
     super(SSTScriptTestCase, self).setUp()
     # Start with default values
     actions.reset_base_url()
     actions._set_wait_timeout(10, 0.1)
     # Possibly inject parametrization from associated .csv file
     context.populate_context(self.context, self.script_path,
                              self.browser_type, self.javascript_disabled)