#NEWLINE# @ mock . patch ( 'requests.get' , mock . Mock ( side_effect = ( lambda k , auth : MyResponse ( 'tests/bluegreen_app_blue.json' ) ) ) ) #NEWLINE# def test_simple( self ) : #NEWLINE# #INDENT# from six import StringIO #NEWLINE# out = StringIO ( ) #NEWLINE# bluegreen_deploy . process_json ( Arguments ( ) , self ) #NEWLINE# output = json . loads ( out . getvalue ( ) ) #NEWLINE# output [ 'labels' ] [ 'HAPROXY_DEPLOYMENT_STARTED_AT' ] = '' #NEWLINE# expected = json . loads ( '{\n  "acceptedResourceRoles": [\n    "*",\n    "slave_public"\n  ],\n  "container": {\n    "docker": {\n      "forcePullImage": true,\n      "image": "brndnmtthws/nginx-echo-sleep",\n      "network": "BRIDGE",\n      "portMappings": [\n        {\n          "containerPort": 8080,\n          "hostPort": 0,\n          "servicePort": 10001\n        }\n      ]\n    },\n    "type": "DOCKER"\n  },\n  "cpus": 0.1,\n  "healthChecks": [\n    {\n      "gracePeriodSeconds": 15,\n      "intervalSeconds": 3,\n      "maxConsecutiveFailures": 10,\n      "path": "/",\n      "portIndex": 0,\n      "protocol": "HTTP",\n      "timeoutSeconds": 15\n    }\n  ],\n  "id": "/nginx-blue",\n  "instances": 1,\n  "labels": {\n    "HAPROXY_0_PORT": "10000",\n    "HAPROXY_APP_ID": "nginx",\n    "HAPROXY_DEPLOYMENT_ALT_PORT": "10001",\n    "HAPROXY_DEPLOYMENT_COLOUR": "blue",\n    "HAPROXY_DEPLOYMENT_GROUP": "nginx",\n    "HAPROXY_DEPLOYMENT_STARTED_AT": "2016-02-01T15:51:38.184623",\n    "HAPROXY_DEPLOYMENT_TARGET_INSTANCES": "3",\n    "HAPROXY_GROUP": "external"\n  },\n  "mem": 65\n}\n' ) #NEWLINE# expected [ 'labels' ] [ 'HAPROXY_DEPLOYMENT_STARTED_AT' ] = '' #NEWLINE# self . assertEqual ( output , expected )