Beispiel #1
0
 def test_update_metadata(self):
     BatonDataObjectAPI.update_metadata(self.fpath, 'uniq_key', {'second_value'})
     updated_meta = BatonDataObjectAPI.get_all_metadata(self.fpath)
     values = updated_meta.get_avu('uniq_key')
     self.assertEqual(values, {'second_value'})
Beispiel #2
0
 def setUp(self):
     self.fpath = "/humgen/projects/serapis_staging/test-baton/test_metadata_add_rm.txt"
     self.meta_dict = {'sample': {'sample2'}, 'sample_id': {'-1'}}
     self.previous_meta = BatonDataObjectAPI.get_all_metadata(self.fpath)
     BatonDataObjectAPI.add_metadata(self.fpath, self.meta_dict)
Beispiel #3
0
 def test_remove_metadata(self):
     BatonDataObjectAPI.remove_metadata(self.fpath, self.meta_dict)
     crt_meta = BatonDataObjectAPI.get_all_metadata(self.fpath)
     self.assertEqual(crt_meta, self.previous_meta)
Beispiel #4
0
 def test_add_metadata(self):
     BatonDataObjectAPI.add_metadata(self.fpath, self.meta_dict)
     metadata = BatonDataObjectAPI.get_all_metadata(self.fpath).to_dict()
     self.assertDictEqual(self.meta_dict, metadata)