def test_create_execution_context_from(self): message = Message() spec_name = 'SPEC_NAME' spec_file_name = 'SPEC_FILE_NAME' scenario_name = 'SCENARIO_NAME' step_name = 'STEP_NAME' message.executionStartingRequest.\ currentExecutionInfo.currentSpec.name = spec_name message.executionStartingRequest.\ currentExecutionInfo.currentSpec.fileName = spec_file_name message.executionStartingRequest.\ currentExecutionInfo.currentSpec.isFailed = True message.executionStartingRequest.\ currentExecutionInfo.currentScenario.name = scenario_name message.executionStartingRequest.\ currentExecutionInfo.currentScenario.isFailed = False message.executionStartingRequest.\ currentExecutionInfo.currentStep.step.actualStepText = step_name message.executionStartingRequest.\ currentExecutionInfo.currentStep.isFailed = True specification = Specification(spec_name, spec_file_name, True, []) scenario = Scenario(scenario_name, False, []) step = Step(step_name, True) context = ExecutionContext(specification, scenario, step) expected_execution_context = create_execution_context_from( message.executionStartingRequest.currentExecutionInfo) self.assertEqual(expected_execution_context, context)
def test_ExecutionContextTests_equality(self): name = 'NAME' file_name = 'FILE_NAME' tags = ['TAGS'] specification = Specification(name, file_name, False, tags) scenario = Scenario(name, False, tags) step = Step(name, False) context = ExecutionContext(specification, scenario, step) context1 = ExecutionContext(specification, scenario, step) self.assertEqual(context, context1)
def test_Step_equality(self): name = 'NAME1' step = Step(name, False) step1 = Step(name, False) self.assertEqual(step, step1)
def test_Step(self): name = 'NAME1' step = Step(name, False) self.assertEqual(step.text, name) self.assertEqual(step.is_failing, False)