diff --git a/endpoint_tests/run_REFERENCEM.py b/endpoint_tests/run_REFERENCEM.py index 447243297b6744f62270fed64782776318376758..2c5279680372f0a5e75c1707295646aa46102ad5 100755 --- a/endpoint_tests/run_REFERENCEM.py +++ b/endpoint_tests/run_REFERENCEM.py @@ -62,6 +62,8 @@ model_config = { # Posting the request to VIPSLogic r2 = requests.post("%s/models/%s/run" % (core_server_uri, model_id), json=model_config) #print r2.text +# This script does not import VIPSCore-Python-Common. Thus, it does not have the +# util methods to parse the request, so we do it manually results = r2.json() for result in results: # Create a Python timestamp from the JSON timestamp string @@ -69,10 +71,11 @@ for result in results: # Printing selected result parameters to stdout #print(result) allValues = json.loads(result["allValues"]) + print ("%s: Mean temp today = %s, Accumulated Day Degrees = %s, Warning status = %s" % ( datetime.strftime(timestamp, '%Y-%m-%dT%H:%M %Z'), allValues.get("TM"), - allValues.get("TMDD"), + allValues.get("WEATHER.TMDD"), result["warningStatus"] ) )