summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2018-08-20 12:34:43 -0400
committerTim Rozet <trozet@redhat.com>2018-08-20 12:34:43 -0400
commit25dd19618aecf69917720d10e0e9d7ba2925db14 (patch)
tree173b79028d33230d1c174f0cb3ab894939887fd6
parent911753bbeccd3b39b016c9b8ff4241a067e06e29 (diff)
Fixes unit test failures
Adds mocking some file opens introduced by: https://gerrit.opnfv.org/gerrit/#/c/60991/ Change-Id: I013b9c96a7c3f678c6e227f98cd58f9547d79ecb Signed-off-by: Tim Rozet <trozet@redhat.com>
-rw-r--r--apex/tests/test_apex_overcloud_deploy.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/apex/tests/test_apex_overcloud_deploy.py b/apex/tests/test_apex_overcloud_deploy.py
index 9dd5289d..1ba5dd90 100644
--- a/apex/tests/test_apex_overcloud_deploy.py
+++ b/apex/tests/test_apex_overcloud_deploy.py
@@ -454,6 +454,7 @@ class TestOvercloudDeploy(unittest.TestCase):
@patch('apex.overcloud.deploy.fileinput')
@patch('apex.overcloud.deploy.shutil')
+ @patch('builtins.open', mock_open())
def test_prep_env_round_two(self, mock_shutil, mock_fileinput):
mock_fileinput.input.return_value = \
['NeutronVPPAgentPhysnets']
@@ -499,6 +500,7 @@ class TestOvercloudDeploy(unittest.TestCase):
@patch('apex.overcloud.deploy.fileinput')
@patch('apex.overcloud.deploy.shutil')
+ @patch('builtins.open', mock_open())
def test_prep_env_round_three(self, mock_shutil, mock_fileinput):
mock_fileinput.input.return_value = \
['OS::TripleO::Services::NeutronDhcpAgent',
@@ -541,6 +543,7 @@ class TestOvercloudDeploy(unittest.TestCase):
@patch('apex.overcloud.deploy.fileinput')
@patch('apex.overcloud.deploy.shutil')
+ @patch('builtins.open', mock_open())
def test_prep_env_tenant_vlan(self, mock_shutil, mock_fileinput):
mock_fileinput.input.return_value = \
['NeutronNetworkVLANRanges',
@@ -591,6 +594,7 @@ class TestOvercloudDeploy(unittest.TestCase):
@patch('apex.overcloud.deploy.fileinput')
@patch('apex.overcloud.deploy.shutil')
+ @patch('builtins.open', mock_open())
def test_prep_env_tenant_vlan_odl(self, mock_shutil, mock_fileinput):
mock_fileinput.input.return_value = \
['NeutronNetworkVLANRanges',