Skip to content

Commit 5778764

Browse files
committed
Python: Stop using deprecated getName in collections taint test
1 parent 3db551d commit 5778764

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

  • python/ql/test/library-tests/taint/collections

python/ql/test/library-tests/taint/collections/TestStep.ql

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@ import python
22
import semmle.python.security.TaintTracking
33
import Taint
44

5-
65
from TaintedNode n, TaintedNode s
7-
where n.getLocation().getFile().getName().matches("%test.py") and
8-
s.getLocation().getFile().getName().matches("%test.py") and
9-
s = n.getASuccessor()
10-
select
11-
"Taint " + n.getTaintKind(), n.getLocation().toString(), n.getAstNode(), n.getContext(),
12-
" --> ",
13-
"Taint " + s.getTaintKind(), s.getLocation().toString(), s.getAstNode(), s.getContext()
6+
where
7+
n.getLocation().getFile().getShortName() = "test.py" and
8+
s.getLocation().getFile().getShortName() = "test.py" and
9+
s = n.getASuccessor()
10+
select "Taint " + n.getTaintKind(), n.getLocation().toString(), n.getAstNode(), n.getContext(),
11+
" --> ", "Taint " + s.getTaintKind(), s.getLocation().toString(), s.getAstNode(), s.getContext()

0 commit comments

Comments
 (0)