(src: str, pattern: str, cache_mock, taint: str="tainted")
| 12 | |
| 13 | @patch("aura.cache.ASTPatternCache.proxy") |
| 14 | def process_taint(src: str, pattern: str, cache_mock, taint: str="tainted"): |
| 15 | tree = collect(dedent(src), minimal=True) |
| 16 | loc = ScanLocation(location="<unknown>") |
| 17 | p = ASTPattern({ |
| 18 | "pattern": pattern, |
| 19 | "taint": taint |
| 20 | }) |
| 21 | |
| 22 | cache_mock.return_value = [p] |
| 23 | |
| 24 | v = Visitor.run_stages(location=loc, ast_tree=tree) |
| 25 | return v.tree[-1] |
| 26 | |
| 27 | |
| 28 |
no test coverage detected