Esempio n. 1
0
 def test_check_attribute_count_when_not_found(self):
     raw_metadata = IrodsRawFileMetadata(fpath='/home/myfile')
     raw_metadata.avus = {'sample': set(['1', '2', '3'])}
     result = raw_metadata.check_attribute_count([AttributeCount(attribute='study', count=2, operator='>')])
     #self.assertEqual(len(result), 1)
     self.assertEqual(result.result, RESULT.FAILURE)
Esempio n. 2
0
 def test_check_attribute_count_equal_ok(self):
     raw_metadata = IrodsRawFileMetadata(fpath='/home/myfile')
     raw_metadata.avus = {'sample': set(['1', '2', '3'])}
     result = raw_metadata.check_attribute_count([AttributeCount(attribute='sample', count=3, operator='=')])
     #self.assertEqual(len(result), 1)
     self.assertEqual(result.result, RESULT.SUCCESS)