test_tea_TestCMS

Posted 两掺豆腐脑丶

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了test_tea_TestCMS相关的知识,希望对你有一定的参考价值。

# -*- coding: utf-8 -*-

"""
@Time    : 2021/12/16 17:42
@Author  : 阿涛@
"""
# -*- coding: utf-8 -*-

"""
@Time    : 2021/12/16 14:11
@Author  : zero
"""

import unittest
import requests
import my_rand
import random
# from api.cms import CMSApi
from api.cms_teacher import CMSApi


class Teacher_TestCMS(unittest.TestCase):
    session = requests.Session()
    cms_api = CMSApi("http://192.168.31.72:8080")

    def test_001_login(self):
        url = "/cms/manage/loginJump.do"
        data = 
            "userAccount": "admin",
            "loginPwd": "123456"
        
        resp = self.cms_api.post(url, data)
        print(resp.text)
        assert "登录成功" in resp.text

    def test_002_query_user(self):
        url = "/cms/manage/queryUserList.do"
        data = 
            "startCreateDate": "",
  

以上是关于test_tea_TestCMS的主要内容,如果未能解决你的问题,请参考以下文章