MCPcopy Index your code
hub / github.com/SourceCode-AI/aura / test_ast_parser

Function test_ast_parser

tests/test_cli.py:146–159  ·  view source on GitHub ↗
(fixtures)

Source from the content-addressed store, hash-verified

144
145
146def test_ast_parser(fixtures):
147 pth = fixtures.path('obfuscated.py')
148
149 result = fixtures.get_cli_output(['parse_ast', os.fspath(pth)])
150 assert "aura.analyzers.python.nodes" in result.stdout
151 assert "http://malware.com/CnC" in result.stdout
152 assert "Hello world" in result.stdout
153 assert "adalaraoawa aoalalaeaH" not in result.stdout
154
155 result = fixtures.get_cli_output(['parse_ast', os.fspath(pth), "-s", "raw"])
156 assert "aura.analyzers.python.nodes" not in result.stdout
157 assert "http://malware.com/CnC" not in result.stdout
158 assert "Hello world" not in result.stdout
159 assert "adalaraoawa aoalalaeaH" in result.stdout
160
161
162@pytest.mark.e2e

Callers

nothing calls this directly

Calls 2

pathMethod · 0.80
get_cli_outputMethod · 0.80

Tested by

no test coverage detected