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 import create_keypair
16 class CreateKeypairTestCase(unittest.TestCase):
17 @mock.patch.object(create_keypair, 'paramiko')
18 @mock.patch.object(create_keypair, 'op_utils')
19 def test_create_keypair(self, mock_op_utils, *args):
21 'key_name': 'yardstick_key',
22 'key_path': '/tmp/yardstick_key'
24 args = {"options": options}
25 obj = create_keypair.CreateKeypair(args, {})
27 mock_op_utils.create_keypair.assert_called_once()