'Testing adding a project'

@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_modifying_a_project_no_attributes(self, mock_cmd, mock_write, mock_tmpfile_copy, mock_loc_oc_bin):

    params = copy.deepcopy(self.params)
    params['display_name'] = None
    params['node_selector'] = None
    params['description'] = None
    project_results = '{\n                                                "kind":    "Project",\n                                                "apiVersion":    "v1",\n                                                "metadata":    {\n                                                                "name":    "operations",\n                                                                "selfLink":    "/oapi/v1/projects/operations",\n                                                                "uid":    "5e52afb8-ee33-11e6-89f4-0edc441d9666",\n                                                                "resourceVersion":    "1584",\n                                                                "labels":    {},\n                                                                "annotations":    {\n                                                                                "openshift.io/node-selector":    "",\n                                                                                "openshift.io/description:    "This    is    a    description",\n                                                                                "openshift.io/sa.initialized-roles":    "true",\n                                                                                "openshift.io/sa.scc.mcs":    "s0:c3,c2",\n                                                                                "openshift.io/sa.scc.supplemental-groups":    "1000010000/10000",\n                                                                                "openshift.io/sa.scc.uid-range":    "1000010000/10000"\n                                                                }\n                                                },\n                                                "spec":    {\n                                                                "finalizers":    [\n                                                                                "kubernetes",\n                                                                                "openshift.io/origin"\n                                                                ]\n                                                },\n                                                "status":    {\n                                                                "phase":    "Active"\n                                                }\n                                }'
    mock_cmd.side_effect = [(0, project_results, '')]
    mock_tmpfile_copy.side_effect = ['/tmp/mocked_kubeconfig']
    mock_loc_oc_bin.side_effect = ['oc']
    results = OCProject.run_ansible(params, False)
    self.assertFalse(results['changed'])
    mock_cmd.assert_has_calls([mock.call(['oc', 'get', 'namespace', 'operations', '-o', 'json'], None)])
