def testcycle_has_testrun(step, cycle_name, run_name):
    testcycleModel = TestcycleModel()
    testcycle_id = testcycleModel.get_resid(cycle_name)[0]

    testrun_list = testcycleModel.get_testrun_list(testcycle_id)

    found_run = [x for x in testrun_list if x[ns("name")] == run_name]
    assert len(found_run) == 1, "Expected to find name %s in:\n%s" % (
        run_name, jstr(testrun_list))
def testcycle_has_testrun(step, cycle_name, run_name):
    testcycleModel = TestcycleModel()
    testcycle_id = testcycleModel.get_resid(cycle_name)[0]

    testrun_list = testcycleModel.get_testrun_list(testcycle_id)

    found_run = [x for x in testrun_list if x[ns("name")] == run_name]
    assert len(found_run) == 1, "Expected to find name %s in:\n%s" % (run_name,
                                                                      jstr(testrun_list))
Example #3
0
def testcycle_has_testruns(step, stored_testcycle, testcycle_name, expect_any):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle,
                                                       testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    testrun_list = testcycleModel.get_testrun_list(testcycle_id)

    eq_list_length(testrun_list, step.hashes)

    # walk through and verify that each testcase has the expected status
    for testrun in step.hashes:
        # find that in the list of testcases
        exp_name = testrun["name"]

        verify_single_item_in_list(testrun_list, "name", exp_name)
def testcycle_has_testruns(step, stored_testcycle, testcycle_name, expect_any):
    testcycleModel = TestcycleModel()
    testcycle = testcycleModel.get_stored_or_store_obj(stored_testcycle, testcycle_name)
    testcycle_id = get_resource_identity(testcycle)[0]

    # get the list of testcases for this testcycle
    testrun_list = testcycleModel.get_testrun_list(testcycle_id)

    eq_list_length(testrun_list, step.hashes)

    # walk through and verify that each testcase has the expected status
    for testrun in step.hashes:
        # find that in the list of testcases
        exp_name = testrun["name"]

        verify_single_item_in_list(testrun_list,
                                   "name",
                                   exp_name)