Skip to content

Commit 35961e4

Browse files
Fix tests to check for the correct type
1 parent 8b174ea commit 35961e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/ql/test/library-tests/frameworks/lxml/taint_test.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,15 @@ def func(tree_arg: ET.ElementTree):
138138
def func2(x):
139139
return x
140140

141-
def func3(x) -> ET.Element:
141+
def func3(x) -> ET.ElementTree:
142142
return x
143143

144144
ensure_tainted(
145145
func2(tree), # $ tainted
146-
func2(tree).text, # $ MISSING:tainted - type tracking not tracked through flow preserving calls
147-
func3(tree).text, # $ MISSING:tainted - this includes if there is a type hint annotation on the return
146+
func2(tree).getroot().text, # $ MISSING:tainted - type tracking not tracked through flow preserving calls
147+
func3(tree).getroot().text, # $ MISSING:tainted - this includes if there is a type hint annotation on the return
148148
typing.cast(ET.ElementTree, tree), # $ tainted
149-
typing.cast(ET.ElementTree, tree).text, # $ MISSING:tainted - this includes for flow summary models
149+
typing.cast(ET.ElementTree, tree).getroot().text, # $ MISSING:tainted - this includes for flow summary models
150150

151151
)
152152

0 commit comments

Comments
 (0)