import pytest

from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_doctor_api.web2_request import web2_request


class TestArtemisAdAddShoppingCartInfo:
    data = BaseRequest().api_load(path_setting.ADADDSHOPPINGCARTINFO)
    adaddshoppingcartinfo_case, adaddshoppingcartinfo_data = get_ids(data, "artemis_ad_add_shopping_cart_info")


    @pytest.mark.parametrize("param",adaddshoppingcartinfo_data,ids=adaddshoppingcartinfo_case)
    def test_artemis_ad_add_shopping_cart_info(self, param):
        '''我的购物车列表'''
        r = web2_request().artemis_ad_add_shopping_cart_info()
        if r["error"] == 0:
            data = r.get("data").get("data", [])
            assert len(data) >= param["assert"]



