Commit 09a5c82e authored by panos's avatar panos

A bug fixed in the test code

parent 4a802e16
......@@ -35,7 +35,6 @@ class KnowledgeExtractionExamples(TestCase):
jsonFile = open(os.path.join(filepath, 'JSON_ParallelStations.json'))
result = main(test=1,workbook=workbook,jsonFile=jsonFile)
result_data = json.loads(result)
result_data=result_data['result']['result_list'][0]
elementList=result_data.get('elementList',[])
for element in elementList:
......@@ -58,11 +57,11 @@ class KnowledgeExtractionExamples(TestCase):
elementList=result_data.get('elementList',[])
for element in elementList:
if element['id']=='E1':
self.assertEquals(element['results']['throughput'][0], 272)
self.assertTrue(240<element['results']['throughput'][0]<250)
if element['id']=='M2':
self.assertTrue(13.05<element['results']['working_ratio'][0]<13.06)
self.assertTrue(11.00<element['results']['working_ratio'][0]<12.00)
if element['id']=='M1':
self.assertTrue(92.01<element['results']['working_ratio'][0]<92.02)
self.assertTrue(91.90<element['results']['working_ratio'][0]<92.90)
jsonFile.close()
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