摘要:
阅读全文
摘要:
import pytestimport requestsclass TestCase(object): def test_case_01(self): assert 1 def test_case_02(self): assert {"title":"v2ex"} != {"title":"V2EX 阅读全文
摘要:
import pytestimport requests#定义预期结果:expect = {"title":"V2EX"}class TestCase(object): def test_case_01(self): assert 1 def test_case_02(self): assert { 阅读全文
摘要:
import pytestimport requestsimport sys#建立数据库连接:def setup_function(): print("建立数据库连接成功...")def test_case_01(): assert 1#断开数据库连接:def teardown_function() 阅读全文
摘要:
import pytestimport requests#定义预期结果:expect = {"title":"V2EX"}def test_case_01(): response = requests.get(url='https://www.v2ex.com/api/site/info.json' 阅读全文