-
Notifications
You must be signed in to change notification settings - Fork 109
Description
ft1.1: ******* 正在执行用例 ->event_login_001 *********
请求方式: post,请求URL: http://192.168.250.44:6223/xxx/sys/login
请求参数:
post请求body类型为:json ,body内容为:{"t":1584687365417,"departmentNo":"440682111","username":"admin","password":"xxxxxx","uuid":"","captcha":""}
invalid syntax (, line 1)
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\ddt.py", line 151, in wrapper
return func(self, *args, **kwargs)
File "E:\API_auto\DemoAPI\testcase\testAPI.py", line 35, in test_api
self.result = re.json()
AttributeError: 'NoneType' object has no attribute 'json'
这个是report里报的错,看样子是请求失败了,但 不知道为何失败
这个接口postman,还有我单独使用r = requests.post(url, headers=h,data=data_body)都正常请求
另外,控制台的报错:
C:\ProgramData\Anaconda3\python.exe E:/API_auto/DemoAPI/run_demo.py
<_io.TextIOWrapper name='' mode='w' encoding='UTF-8'>
Time Elapsed: 0:00:00.001006
E test_api_1 (testAPI.Demo_API)
失败: server_hostname cannot be an empty string or start with a leading dot.
环境python3.7