test_cms
Posted 两掺豆腐脑丶
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了test_cms相关的知识,希望对你有一定的参考价值。
# -*- coding: utf-8 -*-
"""
@Time : 2021/12/16 14:18
@Author : 阿涛@
"""
import hashlib
import unittest
from random import random
from api.cms_teacher import CMSApi
import requests
import my_rand
class TestCMS(unittest.TestCase):
session = requests.session()
cmsApi_ = CMSApi("http://192.168.31.72:8080")
def Headers_(self): # 公有方法 请求头类型
# self.session
headers =
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (Khtml, like Gecko) Chrome/96.0.4664.93 Safari/537.36"
return headers
def test_cms01_login(self):
url1 = "/cms/manage/loginJump.do"
# headers =
# "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36"
#
data =
"userAccount"
以上是关于test_cms的主要内容,如果未能解决你的问题,请参考以下文章