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 ##############################################################################
12 from yardstick.benchmark.scenarios.lib.create_keypair import CreateKeypair
14 PREFIX = "yardstick.benchmark.scenarios.lib.create_keypair"
17 class CreateKeypairTestCase(unittest.TestCase):
18 @mock.patch('{}.paramiko'.format(PREFIX))
19 @mock.patch('{}.op_utils'.format(PREFIX))
20 def test_create_keypair(self, mock_op_utils, mock_paramiko):
22 'key_name': 'yardstick_key',
23 'key_path': '/tmp/yardstick_key'
25 args = {"options": options}
26 obj = CreateKeypair(args, {})
28 self.assertTrue(mock_op_utils.create_keypair.called)
35 if __name__ == '__main__':