Best Python code snippet using tempest_python
test_security_groups_negative.py
Source:test_security_groups_negative.py
...70 protocol='tcp', direction='ingress', ethertype=self.ethertype,71 remote_ip_prefix=remote_ip_prefix)72 @test.attr(type=['negative', 'gate'])73 @test.idempotent_id('4bf786fd-2f02-443c-9716-5b98e159a49a')74 def test_create_security_group_rule_with_non_existent_remote_groupid(self):75 group_create_body, _ = self._create_security_group()76 non_exist_id = str(uuid.uuid4())77 # Create rule with non existent remote_group_id78 group_ids = ['bad_group_id', non_exist_id]79 for remote_group_id in group_ids:80 self.assertRaises(81 lib_exc.NotFound, self.client.create_security_group_rule,82 security_group_id=group_create_body['security_group']['id'],83 protocol='tcp', direction='ingress', ethertype=self.ethertype,84 remote_group_id=remote_group_id)85 @test.attr(type=['negative', 'gate'])86 @test.idempotent_id('b5c4b247-6b02-435b-b088-d10d45650881')87 def test_create_security_group_rule_with_remote_ip_and_group(self):88 sg1_body, _ = self._create_security_group()...
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.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!