fixture.py
1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# -*- 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()