Best Python code snippet using tempest_python
test_roles.py
Source:test_roles.py
...59 self.assertEqual(len(body), 1)60 self.assertIn(role_id, fetched_role_ids)61 @test.attr(type='smoke')62 @test.idempotent_id('18afc6c0-46cf-4911-824e-9989cc056c3a')63 def test_role_create_update_show_list(self):64 r_name = data_utils.rand_name('Role')65 role = self.roles_client.create_role(name=r_name)['role']66 self.addCleanup(self.roles_client.delete_role, role['id'])67 self.assertIn('name', role)68 self.assertEqual(role['name'], r_name)69 new_name = data_utils.rand_name('NewRole')70 updated_role = self.roles_client.update_role(role['id'],71 name=new_name)['role']72 self.assertIn('name', updated_role)73 self.assertIn('id', updated_role)74 self.assertIn('links', updated_role)75 self.assertNotEqual(r_name, updated_role['name'])76 new_role = self.roles_client.show_role(role['id'])['role']77 self.assertEqual(new_name, new_role['name'])...
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!!