def test_summary_keys(self): with ErtTestContext("enkf_key_manager_test", self.config_file) as testContext: ert = testContext.getErt() key_man = KeyManager(ert) self.assertEqual(len(key_man.summaryKeys()), 47) self.assertTrue("FOPT" in key_man.summaryKeys()) self.assertEqual(len(key_man.summaryKeysWithObservations()), 2) self.assertTrue("FOPR" in key_man.summaryKeysWithObservations()) self.assertTrue(key_man.isKeyWithObservations("FOPR"))
def test_gen_data_keys(self): with ErtTestContext("enkf_key_manager_test", self.config_file) as testContext: ert = testContext.getErt() key_man = KeyManager(ert) self.assertEqual( len(key_man.genDataKeys()), 3) self.assertTrue("SNAKE_OIL_WPR_DIFF@199" in key_man.genDataKeys()) self.assertEqual(len(key_man.genDataKeysWithObservations()), 1) self.assertTrue("SNAKE_OIL_WPR_DIFF@199" in key_man.genDataKeysWithObservations()) self.assertTrue(key_man.isKeyWithObservations("SNAKE_OIL_WPR_DIFF@199"))