From bbabe5485b444de9850d647f522eeccfb4944650 Mon Sep 17 00:00:00 2001 From: lkuchlan Date: Tue, 26 Sep 2017 10:47:23 +0300 Subject: [PATCH] Remove unnecessary assertIn addCleanup method uses 'id' key for volume type deletion, so there isn't need to validate that the key exist. Change-Id: I0741de04dbcc329cf642e58987194c11db9e3a9d --- tempest/scenario/manager.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py index 284322238c..95ce53aa5b 100644 --- a/tempest/scenario/manager.py +++ b/tempest/scenario/manager.py @@ -271,10 +271,8 @@ class ScenarioTest(tempest.test.BaseTestCase): if backend_name: extra_specs = {"volume_backend_name": backend_name} - body = client.create_volume_type(name=randomized_name, - extra_specs=extra_specs) - volume_type = body['volume_type'] - self.assertIn('id', volume_type) + volume_type = client.create_volume_type( + name=randomized_name, extra_specs=extra_specs)['volume_type'] self.addCleanup(client.delete_volume_type, volume_type['id']) return volume_type