예제 #1
0
def test_fix_cwe_invalid_string():
    assert fix_cwe("something_really_strange") == ""
예제 #2
0
def test_fix_cwe_valid_string():
    assert fix_cwe("[CWE467] (Use of sizeof on a Pointer Type)") == "467"
예제 #3
0
 def test_fix_cwe_invalid_string(self):
     self.assertEqual(fix_cwe("something_really_strange"), "")
예제 #4
0
 def test_fix_cwe_valid_string(self):
     self.assertEqual(fix_cwe("[CWE467] (Use of sizeof on a Pointer Type)"),
                      "467")
예제 #5
0
def test_fix_cwe_invalid_string():
    assert fix_cwe('something_really_strange') == ''
예제 #6
0
def test_fix_cwe_valid_string():
    assert fix_cwe('[CWE467] (Use of sizeof on a Pointer Type)') == '467'