Python: Add concept test scaffold

This commit is contained in:
Rasmus Lerchedahl Petersen
2020-10-14 20:29:03 +02:00
parent f17720f587
commit 646ced2a1d

View File

@@ -90,6 +90,23 @@ class CodeExecutionTest extends InlineExpectationsTest {
}
}
class SqlExecutionTest extends InlineExpectationsTest {
SqlExecutionTest() { this = "SqlExecutionTest" }
override string getARelevantTag() { result = "getSql" }
override predicate hasActualResult(Location location, string element, string tag, string value) {
exists(SqlExecution e, DataFlow::Node sql |
exists(location.getFile().getRelativePath()) and
sql = e.getSql() and
location = sql.getLocation() and
element = sql.toString() and
value = value_from_expr(sql.asExpr()) and
tag = "getSql"
)
}
}
class HttpServerRouteSetupTest extends InlineExpectationsTest {
HttpServerRouteSetupTest() { this = "HttpServerRouteSetupTest" }