TA的每日心情 | 无聊 2017-11-18 09:26 |
---|
签到天数: 41 天 连续签到: 1 天 [LV.5]测试团长
|
本帖最后由 cui_ 于 2017-11-17 14:22 编辑
AssertionError: False != 'true'这个该怎么修改了 #coding=utf-8import unittest
import requests
'''学员卡列表分页查询'''
class studentID_list_page(unittest.TestCase):
def setUp(self):
self.base_url='http://192.168.11.128:8080/customerCard/list'
def test_get_list(self):
auth_user = ('ONLY_BOSS_MCC_ID','ev1UkWT3AiE04c9SDuBhcPUeumgLjtd4kjVqPiYU')
payload = { "pageNo": 1,"pageSize": 5}
r = requests.post(self.base_url,auth = auth_user,data = payload)
self.result = r.json()
self.assertEqual(self.result['isSuccess'],'true')
def tearDown(self):
print self.result
if __name__ == '__main__':
unittest.main()
报错提示
FAIL: test_get_list (__main__.studentID_list_page)
----------------------------------------------------------------------
Traceback (most recent call last):
File "C:\Users\admin\Desktop\boss接口文件夹\学生卡\student_list.py", line 16, in test_get_list
self.assertEqual(self.result['isSuccess'],'true')
AssertionError: False != 'true'
----------------------------------------------------------------------
Ran 1 test in 0.052s
FAILED (failures=1)
>>>
|
|