Commit c8b87a80 authored by Georgios Dagkakis's avatar Georgios Dagkakis

testSimulationTopology updated to current structure

parent db1c84b1
...@@ -55,9 +55,9 @@ class SimulationTopology(TestCase): ...@@ -55,9 +55,9 @@ class SimulationTopology(TestCase):
result = LineGenerationJSON.main(input_data=input_data) result = LineGenerationJSON.main(input_data=input_data)
result_data = json.loads(result) result_data = json.loads(result)
# Slightly change the output to make it stable # Slightly change the output to make it stable
del result_data["general"]["totalExecutionTime"] del result_data['result']['result_list'][0]["general"]["totalExecutionTime"]
result_data["elementList"].sort(key=lambda x: x["id"]) result_data['result']['result_list'][0]["elementList"].sort(key=lambda x: x["id"])
stable_result = json.dumps(result_data, indent=True, sort_keys=True) stable_result = json.dumps(result_data['result']['result_list'][0], indent=True, sort_keys=True)
dump_path = os.path.join(self.dump_folder_path, "%s.result" % filename) dump_path = os.path.join(self.dump_folder_path, "%s.result" % filename)
if bool(os.environ.get("dump", False)): if bool(os.environ.get("dump", False)):
dump_file = open(dump_path, 'w') dump_file = open(dump_path, 'w')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment