def testSuccessfulQuery(self): req = DAL.newDataRequest('grid') req.setLocationNames('RUC130') req.setParameters('T', 'GH') req.setLevels('300MB', '500MB', '700MB') times = CTQ.getAvailableTimes(req) self.assertNotEqual(len(times), 0)
def testSuccessfulQuery(self): req = DAL.newDataRequest('grid') req.setLocationNames('RUC130') req.setParameters('T','GH') req.setLevels('300MB', '500MB','700MB') times = CTQ.getAvailableTimes(req); self.assertNotEqual(len(times), 0)
def testNonIntersectingQuery(self): """ Test that when a parameter is only available on one of the levels that no times are returned. """ req = DAL.newDataRequest('grid') req.setLocationNames('RUC130') req.setParameters('T', 'GH', 'LgSP1hr') req.setLevels('300MB', '500MB', '700MB', '0.0SFC') times = CTQ.getAvailableTimes(req) self.assertEqual(len(times), 0)
def testNonIntersectingQuery(self): """ Test that when a parameter is only available on one of the levels that no times are returned. """ req = DAL.newDataRequest('grid') req.setLocationNames('RUC130') req.setParameters('T','GH', 'LgSP1hr') req.setLevels('300MB', '500MB','700MB','0.0SFC') times = CTQ.getAvailableTimes(req); self.assertEqual(len(times), 0)