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.
36 lines
1.2 KiB
36 lines
1.2 KiB
|
1 week ago
|
#-*-coding:utf-8-*-
|
||
|
|
__author__ = 'Emily'
|
||
|
|
|
||
|
|
#@Time:2019/12/4 11:08
|
||
|
|
|
||
|
|
import unittest
|
||
|
|
import requests
|
||
|
|
|
||
|
|
class AAM(unittest.TestCase):
|
||
|
|
def setUp(self):
|
||
|
|
self.get_url= 'http://192.168.55.99/?m=shows&a=getfortms&type=aam3'
|
||
|
|
#self.get_url= 'http://192.168.55.99/?m=shows&a=getfortms&type=aam2&begindate=2019-01-06'
|
||
|
|
self.header={'Content-Type': 'application/x-www-form-urlencoded', 'CINEMACODE': '304'}
|
||
|
|
|
||
|
|
def test_local_day(self):
|
||
|
|
#payload='&data={}'
|
||
|
|
"""不传营业日"""
|
||
|
|
#payload = 'http://192.168.55.99/?m=shows&a=getfortms&type=aam3'
|
||
|
|
"""指定营业日"""
|
||
|
|
# payload = 'http://192.168.55.99/?m=shows&a=getfortms&type=aam3&begindate=2020-01-06'
|
||
|
|
"""查询期间营业日"""
|
||
|
|
#payload = 'http://192.168.55.99/?m=shows&a=getfortms&type=aam3&begindate=2020-01-06&enddate=2020-01-13'
|
||
|
|
"""营业日超过7天"""
|
||
|
|
payload = 'http://192.168.55.99/?m=shows&a=getfortms&type=aam3&begindate=2020-01-06&enddate=2020-01-30'
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
req = requests.post(self.get_url,headers=self.header,data=payload)
|
||
|
|
result=req.json()
|
||
|
|
print("打印当天放映场次",result)
|
||
|
|
|
||
|
|
def tearDown(self):
|
||
|
|
pass
|
||
|
|
|
||
|
|
if __name__ == '__main__':
|
||
|
|
unittest.main()
|