Best Python code snippet using tempest_python
test_security_groups_negative.py
Source:test_security_groups_negative.py
...58 security_group_id=group_create_body['security_group']['id'],59 protocol=pname, direction='ingress', ethertype=self.ethertype)60 @test.attr(type=['negative', 'gate'])61 @test.idempotent_id('5f8daf69-3c5f-4aaa-88c9-db1d66f68679')62 def test_create_security_group_rule_with_bad_remote_ip_prefix(self):63 group_create_body, _ = self._create_security_group()64 # Create rule with bad remote_ip_prefix65 prefix = ['192.168.1./24', '192.168.1.1/33', 'bad_prefix', '256']66 for remote_ip_prefix in prefix:67 self.assertRaises(68 lib_exc.BadRequest, self.client.create_security_group_rule,69 security_group_id=group_create_body['security_group']['id'],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())...
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!!