From 5cc39c4b3a2de6d670f357ed3329a4d6587c7fc7 Mon Sep 17 00:00:00 2001 From: asteroide Date: Thu, 6 Jul 2017 15:37:03 +0200 Subject: Update test and visualization scripts Change-Id: I62d50d8d3e839a1d6c8ff948cc84ecc45bb0e92f --- moonv4/moon_interface/tests/apitests/utils/models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'moonv4/moon_interface/tests/apitests/utils/models.py') diff --git a/moonv4/moon_interface/tests/apitests/utils/models.py b/moonv4/moon_interface/tests/apitests/utils/models.py index 8343f77e..5039d185 100644 --- a/moonv4/moon_interface/tests/apitests/utils/models.py +++ b/moonv4/moon_interface/tests/apitests/utils/models.py @@ -1,7 +1,13 @@ import requests import copy +import configparser -URL = "http://172.18.0.11:38001{}" +config = configparser.ConfigParser() +if not config.read("moon.conf"): + config.read("/etc/moon/moon.conf") + +URL = "http://{}:{}".format(config['interface']['host'], config['interface']['port']) +URL = URL + "{}" HEADERS = {"content-type": "application/json"} model_template = { -- cgit 1.2.3-korg