(fixtures)
| 144 | |
| 145 | |
| 146 | def 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 |
nothing calls this directly
no test coverage detected