Skip to content

Commit

Permalink
Add some more flask tests whilst I'm here
Browse files Browse the repository at this point in the history
  • Loading branch information
tonybaloney committed Feb 5, 2020
1 parent 0a05861 commit 2e1c476
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/java/security/validators/FlaskDebugModeInspectionTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,24 @@ class FlaskDebugModeInspectionTest: SecurityTestTask() {
""".trimIndent()
testCodeCallExpression(code, 0, FlaskDebugModeCheck, "test.py", FlaskDebugModeInspection())
}

@Test
fun `test flask not imported`(){
var code = """
from banana import Flask
app = Flask()
blah.run()
""".trimIndent()
testCodeCallExpression(code, 0, FlaskDebugModeCheck, "test.py", FlaskDebugModeInspection())
}

@Test
fun `test not reference parent`(){
var code = """
from flask import Flask
"1".run()
""".trimIndent()
testCodeCallExpression(code, 0, FlaskDebugModeCheck, "test.py", FlaskDebugModeInspection())
}
}

0 comments on commit 2e1c476

Please sign in to comment.