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_floating_ip import CreateFloatingIp
15 class CreateFloatingIpTestCase(unittest.TestCase):
17 @mock.patch('yardstick.common.openstack_utils.create_floating_ip')
18 @mock.patch('yardstick.common.openstack_utils.get_network_id')
19 @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
20 def test_create_floating_ip(self, mock_create_floating_ip, mock_get_network_id, mock_get_neutron_client):
22 args = {"options": options}
23 obj = CreateFloatingIp(args, {})
25 self.assertTrue(mock_create_floating_ip.called)
26 self.assertTrue(mock_get_network_id.called)
27 self.assertTrue(mock_get_neutron_client.called)
33 if __name__ == '__main__':