예제 #1
0
def create_testsuite_with_name(step, stored, name):
    testsuiteModel = TestsuiteModel()
    name = testsuiteModel.get_stored_or_store_name(stored, name)

    post_payload = {"productId": ProductModel().get_seed_resid()[0],
                    "name": name,
                    "description": "Sweet Relief",
                    "useLatestVersions": "true"
                   }
    testsuiteModel.create(post_payload)
def create_testsuite_with_name(step, stored, name):
    testsuiteModel = TestsuiteModel()
    name = testsuiteModel.get_stored_or_store_name(stored, name)

    post_payload = {
        "productId": ProductModel().get_seed_resid()[0],
        "name": name,
        "description": "Sweet Relief",
        "useLatestVersions": "true"
    }
    testsuiteModel.create(post_payload)
예제 #3
0
def create_testsuites(step):
    testsuiteModel = TestsuiteModel()

    for item in step.hashes:
        # must do this or it will freak out the lettuce reporting, because
        # we delete items from this before submitting.
        testsuite = item.copy()

        # get the product id from the passed product name
        product_id = ProductModel().get_resid(testsuite["product name"])[0]

        testsuite["productId"] = product_id

        if testsuite.has_key('product name'):
            del testsuite['product name']

        testsuiteModel.create(testsuite)
def create_testsuites(step):
    testsuiteModel = TestsuiteModel()

    for item in step.hashes:
        # must do this or it will freak out the lettuce reporting, because
        # we delete items from this before submitting.
        testsuite = item.copy()

        # get the product id from the passed product name
        product_id = ProductModel().get_resid(testsuite["product name"])[0]

        testsuite["productId"] = product_id

        if testsuite.has_key('product name'):
            del testsuite['product name']

        testsuiteModel.create(testsuite)