Best Python code snippet using tempest_python
test_security_groups_negative.py
Source:test_security_groups_negative.py
...96 ethertype=self.ethertype, remote_ip_prefix=prefix,97 remote_group_id=sg2_body['security_group']['id'])98 @test.attr(type=['negative', 'gate'])99 @test.idempotent_id('5666968c-fff3-40d6-9efc-df1c8bd01abb')100 def test_create_security_group_rule_with_bad_ethertype(self):101 group_create_body, _ = self._create_security_group()102 # Create rule with bad ethertype103 ethertype = 'bad_ethertype'104 self.assertRaises(105 lib_exc.BadRequest, self.client.create_security_group_rule,106 security_group_id=group_create_body['security_group']['id'],107 protocol='udp', direction='ingress', ethertype=ethertype)108 @test.attr(type=['negative', 'gate'])109 @test.idempotent_id('0d9c7791-f2ad-4e2f-ac73-abf2373b0d2d')110 def test_create_security_group_rule_with_invalid_ports(self):111 group_create_body, _ = self._create_security_group()112 # Create rule for tcp protocol with invalid ports113 states = [(-16, 80, 'Invalid value for port -16'),114 (80, 79, 'port_range_min must be <= port_range_max'),...
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!!