Remove main() and __main__ from tests.
[yardstick.git] / yardstick / tests / unit / benchmark / scenarios / lib / test_delete_port.py
1 ##############################################################################
2 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
3 #
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 ##############################################################################
9 import unittest
10 import mock
11
12 from yardstick.benchmark.scenarios.lib.delete_port import DeletePort
13
14
15 class DeletePortTestCase(unittest.TestCase):
16
17     @mock.patch('yardstick.common.openstack_utils.get_neutron_client')
18     def test_delete_port(self, mock_get_neutron_client):
19         options = {
20             'port_id': '123-123-123'
21         }
22         args = {"options": options}
23         obj = DeletePort(args, {})
24         obj.run({})
25         self.assertTrue(mock_get_neutron_client.called)