From c08768c051ae86a1c62feb878848acf0c653b82b Mon Sep 17 00:00:00 2001 From: Kenny Woodson Date: Fri, 3 Mar 2017 10:46:55 -0500 Subject: Fixed the none namespace. Fixed tests with latest loc_oc_binary call. --- roles/lib_openshift/src/test/unit/test_oc_project.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'roles/lib_openshift/src/test/unit') 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) -- cgit v1.2.3