Exemplo n.º 1
0
 def test_verify_controller_module_null_attr(self):
     try:
         tmp = mock_controller.MOBLY_CONTROLLER_CONFIG_NAME
         mock_controller.MOBLY_CONTROLLER_CONFIG_NAME = None
         msg = 'Controller interface .* in .* cannot be null.'
         with self.assertRaisesRegex(signals.ControllerError, msg):
             controller_manager.verify_controller_module(mock_controller)
     finally:
         mock_controller.MOBLY_CONTROLLER_CONFIG_NAME = tmp
Exemplo n.º 2
0
 def test_verify_controller_module_missing_attr(self):
     try:
         tmp = mock_controller.MOBLY_CONTROLLER_CONFIG_NAME
         delattr(mock_controller, 'MOBLY_CONTROLLER_CONFIG_NAME')
         msg = 'Module .* missing required controller module attribute'
         with self.assertRaisesRegex(signals.ControllerError, msg):
             controller_manager.verify_controller_module(mock_controller)
     finally:
         setattr(mock_controller, 'MOBLY_CONTROLLER_CONFIG_NAME', tmp)
Exemplo n.º 3
0
 def test_verify_controller_module(self):
     controller_manager.verify_controller_module(mock_controller)