Commit 42f29be9 authored by Georgios Dagkakis's avatar Georgios Dagkakis Committed by panos

do not call json.dumps twice

parent ac70bf2f
...@@ -34,7 +34,7 @@ class KnowledgeExtractionExamples(TestCase): ...@@ -34,7 +34,7 @@ class KnowledgeExtractionExamples(TestCase):
workbook = xlrd.open_workbook(os.path.join(filepath, 'inputData.xls')) workbook = xlrd.open_workbook(os.path.join(filepath, 'inputData.xls'))
jsonFile = open(os.path.join(filepath, 'JSON_TwoParallelStations.json')) jsonFile = open(os.path.join(filepath, 'JSON_TwoParallelStations.json'))
result = main(test=1,workbook=workbook,jsonFile=jsonFile) result = main(test=1,workbook=workbook,jsonFile=jsonFile)
result_data = json.loads(json.loads(result)) result_data = json.loads(result)
result_data=result_data['result']['result_list'][0] result_data=result_data['result']['result_list'][0]
elementList=result_data.get('elementList',[]) elementList=result_data.get('elementList',[])
......
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