Best Python code snippet using tempest_python
test_keypairs_negative.py
Source:test_keypairs_negative.py
...60 k_name)61 self.client.delete_keypair(k_name)62 @test.attr(type=['negative'])63 @test.idempotent_id('1398abe1-4a84-45fb-9294-89f514daff00')64 def test_create_keypair_with_empty_name_string(self):65 # Keypairs with name being an empty string should not be created66 self.assertRaises(lib_exc.BadRequest, self._create_keypair,67 '')68 @test.attr(type=['negative'])69 @test.idempotent_id('3faa916f-779f-4103-aca7-dc3538eee1b7')70 def test_create_keypair_with_long_keynames(self):71 # Keypairs with name longer than 255 chars should not be created72 k_name = 'keypair-'.ljust(260, '0')73 self.assertRaises(lib_exc.BadRequest, self._create_keypair,74 k_name)75 @test.attr(type=['negative'])76 @test.idempotent_id('45fbe5e0-acb5-49aa-837a-ff8d0719db91')77 def test_create_keypair_invalid_name(self):78 # Keypairs with name being an invalid name should not be created...
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!!