summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/test/unit
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2017-03-03 10:46:55 -0500
committerKenny Woodson <kwoodson@redhat.com>2017-03-06 09:09:14 -0500
commitc08768c051ae86a1c62feb878848acf0c653b82b (patch)
tree201fe6f77930e668f81a0e570515ac7a2a8e7557 /roles/lib_openshift/src/test/unit
parentee3609784e12a8961c8167d6326427f5808a9263 (diff)
downloadopenshift-c08768c051ae86a1c62feb878848acf0c653b82b.tar.gz
openshift-c08768c051ae86a1c62feb878848acf0c653b82b.tar.bz2
openshift-c08768c051ae86a1c62feb878848acf0c653b82b.tar.xz
openshift-c08768c051ae86a1c62feb878848acf0c653b82b.zip
Fixed the none namespace. Fixed tests with latest loc_oc_binary call.
Diffstat (limited to 'roles/lib_openshift/src/test/unit')
-rwxr-xr-xroles/lib_openshift/src/test/unit/test_oc_project.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/roles/lib_openshift/src/test/unit/test_oc_project.py b/roles/lib_openshift/src/test/unit/test_oc_project.py
index 3cc439bf7..1f9d353aa 100755
--- a/roles/lib_openshift/src/test/unit/test_oc_project.py
+++ b/roles/lib_openshift/src/test/unit/test_oc_project.py
@@ -35,10 +35,11 @@ class OCProjectTest(unittest.TestCase):
''' setup method will create a file and set to known configuration '''
pass
+ @mock.patch('oc_project.locate_oc_binary')
@mock.patch('oc_project.Utils.create_tmpfile_copy')
@mock.patch('oc_project.Utils._write')
@mock.patch('oc_project.OCProject._run')
- def test_adding_a_project(self, mock_cmd, mock_write, mock_tmpfile_copy):
+ def test_adding_a_project(self, mock_cmd, mock_write, mock_tmpfile_copy, mock_loc_oc_bin):
''' Testing adding a project '''
# Arrange
@@ -96,6 +97,10 @@ class OCProjectTest(unittest.TestCase):
'/tmp/mocked_kubeconfig',
]
+ mock_loc_oc_bin.side_effect = [
+ 'oc',
+ ]
+
# Act
results = OCProject.run_ansible(params, False)