'Testing a get'

@mock.patch('oc_adm_manage_node.Utils.create_tmpfile_copy')
@mock.patch('oc_adm_manage_node.ManageNode.openshift_cmd')
def test_schedulable_false(self, mock_openshift_cmd, mock_tmpfile_copy):

    params = {'node': ['ip-172-31-49-140.ec2.internal'], 'schedulable': False, 'selector': None, 'pod_selector': None, 'list_pods': False, 'kubeconfig': '/etc/origin/master/admin.kubeconfig', 'evacuate': False, 'grace_period': False, 'dry_run': False, 'force': False}
    node = [{'apiVersion': 'v1', 'kind': 'Node', 'metadata': {'creationTimestamp': '2017-01-26T14:34:43Z', 'labels': {'beta.kubernetes.io/arch': 'amd64', 'beta.kubernetes.io/instance-type': 'm4.large', 'beta.kubernetes.io/os': 'linux', 'failure-domain.beta.kubernetes.io/region': 'us-east-1', 'failure-domain.beta.kubernetes.io/zone': 'us-east-1c', 'hostname': 'opstest-node-compute-0daaf', 'kubernetes.io/hostname': 'ip-172-31-51-111.ec2.internal', 'ops_node': 'old', 'region': 'us-east-1', 'type': 'compute'}, 'name': 'ip-172-31-51-111.ec2.internal', 'resourceVersion': '6936', 'selfLink': '/api/v1/nodes/ip-172-31-51-111.ec2.internal', 'uid': '93d7fdfb-e3d4-11e6-a982-0e84250fc302'}, 'spec': {'externalID': 'i-06bb330e55c699b0f', 'providerID': 'aws:///us-east-1c/i-06bb330e55c699b0f'}}]
    mock_openshift_cmd.side_effect = [{'cmd': '/usr/bin/oc    get    node    -o    json    ip-172-31-49-140.ec2.internal', 'results': node, 'returncode': 0}, {'cmd': '/usr/bin/oadm    manage-node    ip-172-31-49-140.ec2.internal    --schedulable=False', 'results': ('NAME                                                                                                                STATUS                AGE\n' + 'ip-172-31-49-140.ec2.internal            Ready,SchedulingDisabled                    5h\n'), 'returncode': 0}]
    mock_tmpfile_copy.side_effect = ['/tmp/mocked_kubeconfig']
    results = ManageNode.run_ansible(params, False)
    self.assertTrue(results['changed'])
    self.assertEqual(results['results']['nodes'][0]['name'], 'ip-172-31-49-140.ec2.internal')
    self.assertEqual(results['results']['nodes'][0]['schedulable'], False)
