def test_Processor_starting_execution_request(self): registry.add_before_suite(impl1) registry.add_before_suite(impl2) request = ExecutionStartingRequest() response = processor.process_execution_starting_request(request, False) self.assertTrue(isinstance(response, ExecutionStatusResponse)) self.assertEqual(False, response.executionResult.failed)
def test_Processor_starting_execution_request(self): registry.add_before_suite(impl1) registry.add_before_suite(impl2) response = Message() request = Message() processors[Message.ExecutionStarting](request, response, None, False) self.assertEqual(Message.ExecutionStatusResponse, response.messageType) self.assertEqual(False, response.executionStatusResponse.executionResult.failed)
def test_Processor_starting_execution_request(self): registry.add_before_suite(impl1) registry.add_before_suite(impl2) response = Message() request = Message() processors[Message.ExecutionStarting](request, response, None) self.assertEqual(Message.ExecutionStatusResponse, response.messageType) self.assertEqual(False, response.executionStatusResponse.executionResult.failed)
def test_Processor_failing_starting_execution_request(self): registry.add_before_suite(failing_impl) response = Message() request = Message() processors[Message.ExecutionStarting](request, response, None, False) self.assertEqual(Message.ExecutionStatusResponse, response.messageType) self.assertEqual(True, response.executionStatusResponse.executionResult.failed) self.assertEqual(ProtoExecutionResult.ASSERTION, response.executionStatusResponse.executionResult.errorType) self.assertEqual('list index out of range', response.executionStatusResponse.executionResult.errorMessage) self.assertNotEqual('', response.executionStatusResponse.executionResult.stackTrace)
def test_Processor_failing_starting_execution_request(self): registry.add_before_suite(failing_impl) response = Message() request = Message() processors[Message.ExecutionStarting](request, response, None) self.assertEqual(Message.ExecutionStatusResponse, response.messageType) self.assertEqual(True, response.executionStatusResponse.executionResult.failed) self.assertEqual(ProtoExecutionResult.ASSERTION, response.executionStatusResponse.executionResult.errorType) self.assertEqual('list index out of range', response.executionStatusResponse.executionResult.errorMessage) self.assertNotEqual('', response.executionStatusResponse.executionResult.stackTrace)
def test_Processor_failing_starting_execution_request(self): registry.add_before_suite(failing_impl) request = ExecutionStartingRequest() response = processor.process_execution_starting_request(request, False) self.assertTrue(isinstance(response, ExecutionStatusResponse)) self.assertEqual(True, response.executionResult.failed) self.assertEqual(ProtoExecutionResult.ASSERTION, response.executionResult.errorType) self.assertEqual('list index out of range', response.executionResult.errorMessage) self.assertNotEqual('', response.executionResult.stackTrace)
def before_suite(func): registry.add_before_suite(func) return func
def before_suite(func): registry.add_before_suite(func) return func