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