fixture.py 1.2 KB
# -*- coding: utf-8 -*-
# ======================================
# @Software: PyCharm
# @Author  : Shitou ✊
# @Time    : 2022/12/21 19:38
# @FileName: fixture.py
# ======================================
"""
获取数据
"""

import requests
from common.handle_config import conf
from tools.handle_token import LoginToken
from jsonpath import jsonpath


# ==================院系相关的数据==================
class SystemManagement(object):
    """系统管理"""

    # ====================================================================
    #                            查看院系列表获取数据
    # ====================================================================
    @classmethod
    def department_list(cls):
        """
        查看院系列表
        """
        url = conf.get('url', 'url_ip') + "/basic/v1/department/list"
        headers = {}
        headers["Authorization"] = LoginToken.login_token()
        data = {
            "pageNumber": "0",
            "pageSize": "3"
        }
        response = requests.request(url=url, method="get", json=data, headers=headers)
        res = response.json()
        return res


if __name__ == '__main__':
    SystemManagement.department_list()