Ejemplo n.º 1
0
def given_a_created_product_with_attributes_and_name_group1(step, product_id):

    attributes = create_default_attribute_list(2)
    body = dict_to_xml(default_product(name=product_id, attributes=attributes))
    response = api_utils.add_new_product(headers=world.headers, body=body)
    assert_true(response.ok, response.content)
    world.product_id = response.json()[PRODUCT_NAME]
Ejemplo n.º 2
0
def given_a_created_product_with_attributes_and_name_group1(step, product_id):

    attributes = create_default_attribute_list(2)
    body = dict_to_xml(default_product(name=product_id, attributes=attributes))
    response = api_utils.add_new_product(headers=world.headers, body=body)
    assert_true(response.ok, response.content)
    world.product_id = response.json()[PRODUCT_NAME]
Ejemplo n.º 3
0
def given_a_created_product_with_all_data_and_name_group1(step, product_id):

    world.metadatas = create_default_metadata_list(5)
    world.attributes = create_default_attribute_list(5)
    world.created_product_body = default_product(name=product_id, metadata=world.metadatas, attributes=world.attributes)
    body = dict_to_xml(world.created_product_body)
    response = api_utils.add_new_product(headers=world.headers, body=body)
    assert_true(response.ok, response.content)
    world.product_id = response.json()[PRODUCT_NAME]
Ejemplo n.º 4
0
def given_a_created_product_with_all_data_and_name_group1(step, product_id):

    world.metadatas = create_default_metadata_list(5)
    world.attributes = create_default_attribute_list(5)
    world.created_product_body = default_product(name=product_id,
                                                 metadata=world.metadatas,
                                                 attributes=world.attributes)
    body = dict_to_xml(world.created_product_body)
    response = api_utils.add_new_product(headers=world.headers, body=body)
    assert_true(response.ok, response.content)
    world.product_id = response.json()[PRODUCT_NAME]