1 ##############################################################################
2 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ##############################################################################
13 from yardstick.benchmark.scenarios.lib.delete_keypair import DeleteKeypair
16 class DeleteKeypairTestCase(unittest.TestCase):
18 @mock.patch('yardstick.common.openstack_utils.get_nova_client')
19 @mock.patch('yardstick.common.openstack_utils.delete_keypair')
20 def test_detach_volume(self, mock_get_nova_client, mock_delete_keypair):
22 'key_name': 'yardstick_key'
24 args = {"options": options}
25 obj = DeleteKeypair(args, {})
27 self.assertTrue(mock_get_nova_client.called)
28 self.assertTrue(mock_delete_keypair.called)
35 if __name__ == '__main__':