上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 96 下一页
摘要: 阅读全文
posted @ 2020-01-20 18:32 干it的小张 阅读(130) 评论(0) 推荐(0) 编辑
摘要: import pytestimport requestsclass TestCase(object): def test_case_01(self): assert 1 def test_case_02(self): assert {"title":"v2ex"} != {"title":"V2EX 阅读全文
posted @ 2020-01-20 17:54 干it的小张 阅读(192) 评论(0) 推荐(0) 编辑
摘要: import pytestimport requests#定义预期结果:expect = {"title":"V2EX"}class TestCase(object): def test_case_01(self): assert 1 def test_case_02(self): assert { 阅读全文
posted @ 2020-01-20 13:25 干it的小张 阅读(288) 评论(0) 推荐(0) 编辑
摘要: import pytestimport requestsimport sys#建立数据库连接:def setup_function(): print("建立数据库连接成功...")def test_case_01(): assert 1#断开数据库连接:def teardown_function() 阅读全文
posted @ 2020-01-20 13:05 干it的小张 阅读(241) 评论(0) 推荐(0) 编辑
摘要: import pytestimport requests#定义预期结果:expect = {"title":"V2EX"}def test_case_01(): response = requests.get(url='https://www.v2ex.com/api/site/info.json' 阅读全文
posted @ 2020-01-20 13:04 干it的小张 阅读(300) 评论(0) 推荐(0) 编辑
上一页 1 ··· 49 50 51 52 53 54 55 56 57 ··· 96 下一页