def verify_realization_haz_curves_stored_to_kvs(the_job, keys): """ This just tests to make sure there something in the KVS for each key in given list of keys. This does NOT test the actual results. """ # TODO (LB): At some point we need to test the actual # results to verify they are correct realizations = int(the_job.params['NUMBER_OF_LOGIC_TREE_SAMPLES']) for realization in xrange(0, realizations): for site in the_job.sites_to_compute(): key = tokens.hazard_curve_poes_key(the_job.job_id, realization, site) self.assertTrue(key in keys, "Missing key %s" % key)
def verify_realization_haz_curves_stored_to_kvs(the_job, keys): """ This just tests to make sure there something in the KVS for each key in given list of keys. This does NOT test the actual results. """ # TODO (LB): At some point we need to test the actual # results to verify they are correct realizations = int( the_job.params['NUMBER_OF_LOGIC_TREE_SAMPLES']) for realization in xrange(0, realizations): for site in the_job.sites_to_compute(): key = tokens.hazard_curve_poes_key( the_job.job_id, realization, site) self.assertTrue(key in keys, "Missing key %s" % key)
def verify_realization_haz_curves_stored_to_kvs(hazengine): """ This just tests to make sure there something in the KVS for each key in given list of keys. This does NOT test the actual results. """ # TODO (LB): At some point we need to test the actual # results to verify they are correct realizations = int( hazengine.params['NUMBER_OF_LOGIC_TREE_SAMPLES']) for realization in xrange(0, realizations): for site in hazengine.sites_to_compute(): key = tokens.hazard_curve_poes_key( hazengine.job_id, realization, site) value = self.kvs_client.get(key) # LOG.debug("kvs value is %s" % value) self.assertTrue(value is not None, "no non-empty value found at KVS key")