Best Python code snippet using tempest_python
test_api_discovery.py
Source:test_api_discovery.py
...18CONF = config.CONF19class TestApiDiscovery(base.BaseIdentityV3Test):20 """Tests for API discovery features."""21 @decorators.idempotent_id('79aec9ae-710f-4c54-a4fc-3aa25b4feac3')22 def test_identity_v3_existence(self):23 versions = self.non_admin_versions_client.list_versions()24 found = any(25 "v3" in version.get('id')26 for version in versions['versions']['values'])27 self.assertEqual(CONF.identity_feature_enabled.api_v3, found)28 @decorators.idempotent_id('721f480f-35b6-46c7-846e-047e6acea0dc')29 @decorators.attr(type='smoke')30 def test_list_api_versions(self):31 # NOTE: Actually this API doesn't depend on v3 API at all, because32 # the API operation is "GET /" without v3's endpoint. The reason of33 # this test path is just v3 API is CURRENT on Keystone side.34 versions = self.non_admin_versions_client.list_versions()35 expected_resources = ('id', 'links', 'media-types', 'status',36 'updated')...
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!!