Example #1
0
 def hook_call(self, configs, name):
     for conf_name, conf_arg in configs.items():
         try:
             # conf.find_conf(conf_name) returns the required conf class,
             # then the class is instantiated with conf_arg, then the
             # conf instance is called with this test instance itself to
             # invoke the desired hook
             conf.find_conf(conf_name)(conf_arg)(self)
         except AttributeError:
             self.stop_server()
             raise TestFailed("%s %s not defined." % (name, conf_name))
Example #2
0
 def hook_call(self, configs, name):
     for conf_name, conf_arg in configs.items():
         try:
             # conf.find_conf(conf_name) returns the required conf class,
             # then the class is instantiated with conf_arg, then the
             # conf instance is called with this test instance itself to
             # invoke the desired hook
             conf.find_conf(conf_name)(conf_arg)(self)
         except AttributeError:
             self.stop_server()
             raise TestFailed("%s %s not defined." % (name, conf_name))
Example #3
0
 def get_server_rules(file_obj):
     """
     The handling of expect header could be made much better when the
     options are parsed in a true and better fashion. For an example,
     see the commented portion in Test-basic-auth.py.
     """
     server_rules = {}
     for rule_name, rule in file_obj.rules.items():
         server_rules[rule_name] = conf.find_conf(rule_name)(rule)
     return server_rules
Example #4
0
 def get_server_rules(file_obj):
     """
     The handling of expect header could be made much better when the
     options are parsed in a true and better fashion. For an example,
     see the commented portion in Test-basic-auth.py.
     """
     server_rules = {}
     for rule_name, rule in file_obj.rules.items():
         server_rules[rule_name] = conf.find_conf(rule_name)(rule)
     return server_rules