'Testing a get'

@mock.patch('oc_scale.Utils.create_tmpfile_copy')
@mock.patch('oc_scale.OCScale.openshift_cmd')
def test_scale(self, mock_openshift_cmd, mock_tmpfile_copy):

    params = {'name': 'router', 'namespace': 'default', 'replicas': 3, 'state': 'list', 'kind': 'dc', 'kubeconfig': '/etc/origin/master/admin.kubeconfig', 'debug': False}
    dc = '{"kind":    "DeploymentConfig",\n                                                            "apiVersion":    "v1",\n                                                            "metadata":    {\n                                                                            "name":    "router",\n                                                                            "namespace":    "default",\n                                                                            "selfLink":    "/oapi/v1/namespaces/default/deploymentconfigs/router",\n                                                                            "uid":    "a441eedc-e1ae-11e6-a2d5-0e6967f34d42",\n                                                                            "resourceVersion":    "6558",\n                                                                            "generation":    8,\n                                                                            "creationTimestamp":    "2017-01-23T20:58:07Z",\n                                                                            "labels":    {\n                                                                                            "router":    "router"\n                                                                            }\n                                                            },\n                                                            "spec":    {\n                                                                            "replicas":    3,\n                                                            }\n                                            }'
    mock_openshift_cmd.side_effect = [{'cmd': '/usr/bin/oc    get    dc    router    -n    default', 'results': dc, 'returncode': 0}, {'cmd': '/usr/bin/oc    create    -f    /tmp/router    -n    default', 'results': '', 'returncode': 0}]
    mock_tmpfile_copy.side_effect = ['/tmp/mocked_kubeconfig']
    results = OCScale.run_ansible(params, False)
    self.assertFalse(results['changed'])
    self.assertEqual(results['result'][0], 3)
