Skip to content

Commit 3a416bc

Browse files
committed
Python: Move test annotation
1 parent 4571b31 commit 3a416bc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/ql/test/experimental/library-tests/frameworks/django/SqlExecution.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ def test_model():
2424
User.objects.extra("some sql") # $getSql="some sql"
2525
User.objects.extra(select="select", where="where", tables="tables", order_by="order_by") # $getSql="select" $getSql="where" $getSql="tables" $getSql="order_by"
2626

27-
raw = RawSQL("so raw") # $getSql="so raw"
28-
User.objects.annotate(val=raw)
27+
raw = RawSQL("so raw")
28+
User.objects.annotate(val=raw) # $getSql="so raw"

python/ql/test/experimental/meta/ConceptsTest.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ class SqlExecutionTest extends InlineExpectationsTest {
9999
exists(SqlExecution e, DataFlow::Node sql |
100100
exists(location.getFile().getRelativePath()) and
101101
sql = e.getSql() and
102-
location = sql.getLocation() and
102+
location = e.getLocation() and
103103
element = sql.toString() and
104104
value = value_from_expr(sql.asExpr()) and
105105
tag = "getSql"

0 commit comments

Comments
 (0)