def test_validate_fields_2(self): irods_metadata = IrodsSeqFileMetadata(fpath='/seq/1234/1234_5#6.bam') result = irods_metadata.validate_fields() self.assertEqual(len(result), 5) for check_res in result: if check_res.check_name == CHECK_NAMES.check_by_comparison_checksum_in_meta_with_checksum_at_upload: self.assertEqual(check_res.result, None) else: self.assertEqual(check_res.result, RESULT.FAILURE)
def test_validate_fields_when_wrong_npg_qc(self): irods_metadata = IrodsSeqFileMetadata(fpath='/seq/1234/1234_5#6.bam', npg_qc='aaAAA', checksum_at_upload='123abc', checksum_in_meta='123abc') result = irods_metadata.validate_fields() self.assertEqual(len(result), 5) for check_res in result: if check_res.check_name in [CHECK_NAMES.check_target_field, CHECK_NAMES.check_npg_qc_field]: self.assertEqual(check_res.result, RESULT.FAILURE) else: self.assertEqual(check_res.result, RESULT.SUCCESS)