import pytest

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


class TestAccountUnreadbadgecount:

    account_unreadbadgecount = BaseRequest().api_load(path_setting.ACCOUNT_DATA)
    AccountUnreadbadgecount_case, AccountUnreadbadgecount_data = get_ids(account_unreadbadgecount, "account_unreadbadgecount")

    @pytest.mark.parametrize("param",AccountUnreadbadgecount_data,ids=AccountUnreadbadgecount_case)
    def test_AccountUnreadbadgecount(self,param):

        r = web_request().account_unreadbadgecount()
        print("=====",r)
        if r["error"] == 0:
            assert r["error"] == param["assert"]
        # elif r["error"] == 1:
        #     assert r["message"] == params["assert"]