X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=tests%2Ftest_apex_python_utils_py.py;h=550042f565cca63b67dd65dfc62cc9c68d112cec;hb=78a9d70f7f6a5b0b0f941c849a9250da2181c428;hp=237c55893ad874ffe4d9c2816a5737cb61c877f9;hpb=51510a96718c909cbcbf02256c440dbdceab7227;p=apex.git diff --git a/tests/test_apex_python_utils_py.py b/tests/test_apex_python_utils_py.py index 237c5589..550042f5 100644 --- a/tests/test_apex_python_utils_py.py +++ b/tests/test_apex_python_utils_py.py @@ -7,7 +7,9 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## +import shutil import sys +import tempfile from test_apex_ip_utils import get_default_gateway_linux from apex_python_utils import main @@ -57,11 +59,13 @@ class TestCommonUtils(object): assert_equal(main(), None) def test_parse_net_settings(self): + tmp_dir = tempfile.mkdtemp() args = self.parser.parse_args(['parse-net-settings', '-s', net_sets, - '--flat', + '-td', tmp_dir, '-e', net_env]) assert_equal(parse_net_settings(args), None) + shutil.rmtree(tmp_dir, ignore_errors=True) def test_parse_deploy_settings(self): args = self.parser.parse_args(['parse-deploy-settings', @@ -77,7 +81,8 @@ class TestCommonUtils(object): args = self.parser.parse_args(['nic-template', '-s', net_sets, '-r', 'compute', - '-t', nic_template]) + '-t', nic_template, + '--deploy-settings-file', deploy_sets]) assert_equal(build_nic_template(args), None) def test_parse_inventory(self):