From b6bda2fe154d067084a99733f42663252ff9b399 Mon Sep 17 00:00:00 2001 From: Dan Radez Date: Mon, 19 Sep 2016 15:06:43 -0400 Subject: Handling file loads and tmp dirs differently Change-Id: I602279b30b035cfc667e4ee9b83905a638440abb Signed-off-by: Dan Radez --- tests/test_apex_python_utils_py.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/test_apex_python_utils_py.py') diff --git a/tests/test_apex_python_utils_py.py b/tests/test_apex_python_utils_py.py index 237c5589..28180f06 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,14 @@ 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', -- cgit 1.2.3-korg