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):
             test_runner.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):
             test_runner.verify_controller_module(mock_controller)
     finally:
         setattr(mock_controller, 'MOBLY_CONTROLLER_CONFIG_NAME', tmp)
Exemplo n.º 3
0
 def test_verify_controller_module(self):
     test_runner.verify_controller_module(mock_controller)