Esempio n. 1
0
 def test_out_of_range(self):
     self.assert_initialize_driver()
     constraints = ParameterConstraints.dict()
     parameters = Parameter.dict()
     log.debug(constraints)
     for each in constraints:
         parameter = parameters[each]
         _, minimum, maximum = constraints[each]
         self.assert_set_exception(parameter, minimum - 1)
         self.assert_set_exception(parameter, maximum + 1)
         self.assert_set_exception(parameter, "strings aren't valid here!")
Esempio n. 2
0
 def test_out_of_range(self):
     self.assert_initialize_driver()
     constraints = ParameterConstraints.dict()
     parameters = Parameter.dict()
     log.debug(constraints)
     for each in constraints:
         parameter = parameters[each]
         _, minimum, maximum = constraints[each]
         self.assert_set_exception(parameter, minimum - 1)
         self.assert_set_exception(parameter, maximum + 1)
         self.assert_set_exception(parameter, "strings aren't valid here!")
Esempio n. 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)
Esempio n. 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.items():
            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)
Esempio n. 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)
Esempio n. 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.items():
            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)