import pytest
from ids_list import get_ids
import path_setting
from in_common.base_request import BaseRequest
from all_backend_api.order_request import order_request


class TestIsExist:
    data = BaseRequest().api_load(path_setting.TRACTATE_ORDER)
    is_exsit_case, is_exsit_data = get_ids(data,"is_exist")

    @pytest.mark.parametrize("param", is_exsit_data, ids=is_exsit_case)
    def test_is_exsit(self,param):
        r = order_request().is_exist()
        assert r["error"] == 0
        assert r["data"]["result"] is True
        # if r["error"] == 0:
        #     assert r["data"]["result"] is True