(console)
| 3 | |
| 4 | |
| 5 | async def test_commands_exist(console): |
| 6 | await console.load_flow(tflow()) |
| 7 | |
| 8 | for binding in console.keymap.bindings: |
| 9 | try: |
| 10 | parsed, _ = console.commands.parse_partial(binding.command.strip()) |
| 11 | |
| 12 | cmd = parsed[0].value |
| 13 | args = [a.value for a in parsed[1:] if a.type != mitmproxy.types.Space] |
| 14 | |
| 15 | assert cmd in console.commands.commands |
| 16 | |
| 17 | cmd_obj = console.commands.commands[cmd] |
| 18 | cmd_obj.prepare_args(args) |
| 19 | except Exception as e: |
| 20 | raise ValueError(f"Invalid binding: {binding.command}") from e |
nothing calls this directly
no test coverage detected
searching dependent graphs…