def create_base_test_steps(): """ Creates a pylarion.test_steps.TestSteps object with associated keys :return: """ from pylarion.work_item import TestSteps as PylTestSteps steps = PylTestSteps() steps.keys = ["args", "expectedResult"]
def generate_test_steps(steps_map): """Generate a new TestSteps object. Fill the steps information with the `steps_map` values. :param steps_map: a list of tuples mapping to each step and its expected result. """ test_steps = TestSteps() test_steps.keys = ['step', 'expectedResult'] steps = [] for item in steps_map: test_step = TestStep() test_step.values = list(item) steps.append(test_step) test_steps.steps = steps return test_steps