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.create_router import CreateRouter
16 class CreateRouterTestCase(unittest.TestCase):
18 @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
19 @mock.patch('yardstick.common.openstack_utils.create_neutron_router')
20 def test_create_router(self, mock_get_neutron_client, mock_create_neutron_router):
23 'admin_state_up': 'True',
24 'name': 'yardstick_router'
27 args = {"options": options}
28 obj = CreateRouter(args, {})
30 self.assertTrue(mock_get_neutron_client.called)
31 self.assertTrue(mock_create_neutron_router.called)
38 if __name__ == '__main__':