예제 #1
0
 def test_out_of_range(self):
     """
     Verify out of range values raise exceptions
     """
     self.assert_initialize_driver()
     constraints = ParameterConstraints.dict()
     parameters = Parameter.dict()
     log.debug(constraints)
     for key in constraints:
         _, minimum, maximum = constraints[key]
         parameter = parameters[key]
         self.assert_set_exception(parameter, minimum - 1)
         self.assert_set_exception(parameter, maximum + 1)
         self.assert_set_exception(parameter, "strings aren't valid here!")
예제 #2
0
 def test_out_of_range(self):
     """
     Verify out of range values raise exceptions
     """
     self.assert_initialize_driver()
     constraints = ParameterConstraints.dict()
     parameters = Parameter.dict()
     log.debug(constraints)
     for key in constraints:
         _, minimum, maximum = constraints[key]
         parameter = parameters[key]
         self.assert_set_exception(parameter, minimum - 1)
         self.assert_set_exception(parameter, maximum + 1)
         self.assert_set_exception(parameter, "strings aren't valid here!")
예제 #3
0
 def test_get_set_parameters(self):
     """
     verify that all parameters can be get set properly, this includes
     ensuring that read only parameters fail on set.
     """
     self.assert_enter_command_mode()
     constraints = ParameterConstraints.dict()
     parameters = Parameter.reverse_dict()
     startup_params = self.test_config.driver_startup_config[DriverConfigKey.PARAMETERS]
     for key, value in startup_params.items():
         self.assert_get_parameter(key, value)
         if key in parameters and parameters[key] in constraints:
             _, minimum, maximum = constraints[parameters[key]]
             self.assert_set_parameter(key, maximum-1)
         else:
             self.assert_set_parameter(key, value + 1)
예제 #4
0
    def test_set_parameters(self):
        """
        Verify we can set all parameters
        """
        self.assert_initialize_driver()
        constraints = ParameterConstraints.dict()
        parameters = Parameter.reverse_dict()
        startup_params = self.test_config.driver_startup_config[DriverConfigKey.PARAMETERS]
        for key, value in startup_params.iteritems():
            if key in parameters and parameters[key] in constraints:
                _, minimum, maximum = constraints[parameters[key]]
                self.assert_set(key, maximum-1)
            else:
                self.assert_set(key, value + 1)

        self.assert_set_bulk(startup_params)
예제 #5
0
 def test_get_set_parameters(self):
     """
     verify that all parameters can be get set properly, this includes
     ensuring that read only parameters fail on set.
     """
     self.assert_enter_command_mode()
     constraints = ParameterConstraints.dict()
     parameters = Parameter.reverse_dict()
     startup_params = self.test_config.driver_startup_config[DriverConfigKey.PARAMETERS]
     for key, value in startup_params.items():
         self.assert_get_parameter(key, value)
         if key in parameters and parameters[key] in constraints:
             _, minimum, maximum = constraints[parameters[key]]
             self.assert_set_parameter(key, maximum-1)
         else:
             self.assert_set_parameter(key, value + 1)
예제 #6
0
    def test_set_parameters(self):
        """
        Verify we can set all parameters
        """
        self.assert_initialize_driver()
        constraints = ParameterConstraints.dict()
        parameters = Parameter.reverse_dict()
        startup_params = self.test_config.driver_startup_config[DriverConfigKey.PARAMETERS]
        for key, value in startup_params.iteritems():
            if key in parameters and parameters[key] in constraints:
                _, minimum, maximum = constraints[parameters[key]]
                self.assert_set(key, maximum-1)
            else:
                self.assert_set(key, value + 1)

        self.assert_set_bulk(startup_params)