How to use test_delete_subnet method in tempest

Best Python code snippet using tempest_python

test_13_delete_subnet.py

Source:test_13_delete_subnet.py Github

copy

Full Screen

...37 # self.relevance = init.ini_request(case_dict, self.relevance, PATH, self.result)38 @pytest.mark.parametrize("case_data", case_dict["test_case"])39 @allure.story("删除子网")40 # @pytest.mark.scenarios_3(1)41 def test_delete_subnet(self, case_data):42 if case_data["request_type"] == "delete":43 ports.Ports().delete_all_port()44 # 参数化修改test_add_project 注释45 for k, v in enumerate(case_dict["test_case"]): # 遍历用例文件中所有用例的索引和值46 try:47 if case_data == v:48 # 修改方法的__doc__在下一次调用时生效,此为展示在报告中的用例描述49 Test_Delete_Subnet.test_delete_subnet.__doc__ = case_dict[50 "test_case"][k + 1]["info"]51 except IndexError:52 pass53 if not self.result["result"]:54 # 查看类变量result的值,如果未False,则前一接口校验错误,此接口标记未失败,节约测试时间55 pytest.xfail("前置接口测试失败,此接口标记为失败")...

Full Screen

Full Screen

subnet.py

Source:subnet.py Github

copy

Full Screen

...53 data = {54 "name": "update_subnet_20190108_test"55 }56 print(_conn.vpcv1.update_subnet('234081a0-60a0-4fef-a742-a8807692164c', vpc_id, **data))57def test_delete_subnet(_conn):58 vpc_id = '90de16ce-3bd5-42e8-a6b3-d275d26ceb33'59 print(_conn.vpcv1.delete_subnet('f4b04ca5-22b9-4152-9b11-984bdbcad29e', vpc_id))60def test_find_subnet(_conn):61 print(_conn.vpcv1.find_subnet('f4b04ca5-22b9-4152-9b11-984bdbcad29e'))62if __name__ == '__main__':63 # test_subnets(conn)64 # test_get_subnet(conn)65 # test_create_subnet(conn)66 # test_update_subnet(conn)67 # test_delete_subnet(conn)68 # test_find_subnet(conn)...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run tempest automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful