import pytest

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


class TestServiceDelete:
    service_delete=BaseRequest().api_load(path_setting.DELETE_DATA)

    ServiceDelete_case, ServiceDeletet_data = get_ids(service_delete, "service_delete")

    @pytest.mark.parametrize("params", ServiceDeletet_data, ids=ServiceDelete_case)

    def test_ServiceDelete(self, params):

        r = web2_request().service_delete(params['is_delete'], params['service_register_id'], params['csrfmiddlewaretoken'])
        print("======", r)

        if r["error"] == 0:
            assert r["error"] == params["assert"]
        # elif r["error"] == 1:
        #     assert r["message"] == params["assert"]
