Ejemplo n.º 1
0
 def testResult(self):
     queryId = "257928e9-73a3-4422-bf20-2d0f80bf2a12"
     r = ResultHandler(queryId)
     res = r.getQuery()
     # convert string to dic
     res = simplejson.loads(res)
     self.assertEqual(res["status"], "done")
     self.assertEqual(res["start_local_time"], "Fri Apr  4 15:59:25 2014")
     self.assertEqual(res["instrument_name"], "D20")
Ejemplo n.º 2
0
def results(queryId):
    """
    Return the contents of localDataStorage has json
    
    Test:
    curl -X POST  http://localhost:8080/results/<queryId>
    """
            
    r = ResultHandler(queryId)
    message = r.getQuery()
    logger.debug(message)
    return message