def test_go_rule_17(): # IDA with anything in withfrom assoc = make_annotation(evidence="IDA", withfrom="BLAH:12345").associations[0] test_result = qc.GoRule17().test(assoc, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.WARNING # Nothing in withfrom, passes assoc.evidence.with_support_from = [] test_result = qc.GoRule17().test(assoc, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.PASS
def test_go_rule_17(): # IDA with anything in withfrom a = ["blah"] * 16 a[6] = "IDA" a[7] = "BLAH:12345" test_result = qc.GoRule17().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.WARNING # Nothing in withfrom, passes a[7] = "" test_result = qc.GoRule17().test(a, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.PASS
def test_go_rule_17(): # IDA with anything in withfrom a = ["blah"] * 15 a[3] = "" a[6] = "IDA" a[7] = "BLAH:12345" a[8] = "P" assoc = gafparser.to_association(a).associations[0] test_result = qc.GoRule17().test(assoc, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.WARNING # Nothing in withfrom, passes assoc.evidence.with_support_from = [] test_result = qc.GoRule17().test(assoc, assocparser.AssocParserConfig()) assert test_result.result_type == qc.ResultType.PASS