def _execute_before_step_hook(request, response, _socket):
    MessagesStore.clear()
    execution_info = create_execution_context_from(
        request.stepExecutionStartingRequest.currentExecutionInfo)
    tags = list(execution_info.scenario.tags) + list(
        execution_info.specification.tags)
    run_hook(request, response, registry.before_step(tags), execution_info)
def process_step_execution_starting_request(request):
    execution_info = create_execution_context_from(
        request.currentExecutionInfo)
    tags = list(execution_info.scenario.tags) + \
        list(execution_info.specification.tags)
    response = run_hook(request, registry.before_step(tags), execution_info)
    _add_message_and_screenshots(response)
    return response
def _execute_before_step_hook(request, response, _socket):
    execution_info = create_execution_context_from(
        request.stepExecutionStartingRequest.currentExecutionInfo)
    tags = list(execution_info.scenario.tags) + list(
        execution_info.specification.tags)
    run_hook(request, response, registry.before_step(tags), execution_info)
    response.executionStatusResponse.executionResult.message.extend(
        MessagesStore.pending_messages())
 def test_before_step_decorator(self):
     funcs = registry.before_step()
     expected = ['before_step1', 'before_step2']
     self.assertEqual(expected, [func.__name__ for func in funcs])
Exemple #5
0
 def test_before_step_decorator(self):
     funcs = registry.before_step()
     expected = ['before_step1', 'before_step2']
     self.assertEqual(expected, [func.__name__ for func in funcs])
Exemple #6
0
def _execute_before_step_hook(request, response, socket):
    _MessagesStore.clear()
    execution_info = create_execution_context_from(request.stepExecutionStartingRequest.currentExecutionInfo)
    tags = list(execution_info.scenario.tags) + list(execution_info.specification.tags)
    run_hook(request, response, registry.before_step(tags), execution_info)