You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

26 lines
808 B

#-*-coding:utf-8-*-
_author_ = 'Emily'
#@Time:2020/11/20 14:39
import unittest
import requests
class getSeatRate(unittest.TestCase):
def setUp(self):
self.get_url = 'http://192.168.55.98/?m=shows&a=getseatrate&showDate=2020-12-23'
#self.get_url = ''
self.header = {'Content-Type': 'application/x-www-form-urlencoded', 'CINEMACODE': '849'}
def test_getSeatRate(self):
#payload = 'http://192.168.55.99/?m=shows&a=getseatrate&showDate=2020-11-20'
payload = ''
req = requests.post(url=self.get_url,data=payload,headers=self.header)
result = req.json()
self.assertEqual(result['status'],1,msg='请求失败')
print('result',"\n",result)
def tearDown(self):
pass
if __name__ == '__main__':
unittest.main()