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.
24 lines
815 B
24 lines
815 B
#-*-coding:utf-8-*- |
|
__author__ = 'Emily' |
|
|
|
#自助取票机领取接口 |
|
import unittest |
|
import requests |
|
class clickToCollect(unittest.TestCase): |
|
def setUp(self): |
|
self.post_url = 'http://192.168.55.99/?m=Autoapi&a=clickToCollect' |
|
self.header={'Content-Type':'application/x-www-form-urlencoded','CINEMACODE':'849'} |
|
|
|
def test_clickToCollect(self): |
|
payload='¶m={"smscode":"66644000388580","activityCode": "TM201905170029","equipmentNum":"ETest","operateTime":"2019-06-05 17:20:00"}' |
|
rep=requests.post(self.post_url,headers=self.header,data=payload) |
|
result=rep.json() |
|
print("打印返回结果:",result) |
|
self.assertEqual(result['status'],1000,msg='请求失败') |
|
def tearDown(self): |
|
pass |
|
|
|
if __name__ == '__main__': |
|
unittest.main() |
|
|
|
|
|
|