예제 #1
0
 def test_get_score_false(self):
     from StixParser import get_score
     result = get_score("not a real score")
     assert result == 0, self.err_msg.format(0, result)
예제 #2
0
 def test_get_score(self):
     from StixParser import get_score
     score_field = "IMPACT:Low, This IP address is not used " \
                   "for legitimate hosting so there should be no operational impact.\n\n"
     result = get_score(score_field)
     assert result == 2, self.err_msg.format(result, 2)