MCPcopy Create free account
hub / github.com/mitmproxy/mitmproxy / test_command_execute

Method test_command_execute

test/mitmproxy/tools/web/test_app.py:391–397  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

389 assert get_json(resp)["set"]["help"]
390
391 def test_command_execute(self):
392 resp = self.fetch("/commands/unknown", method="POST")
393 assert resp.code == 200
394 assert get_json(resp) == {"error": "Unknown command: unknown"}
395 resp = self.fetch("/commands/commands.history.get", method="POST")
396 assert resp.code == 200
397 assert get_json(resp) == {"value": []}
398
399 def test_events(self):
400 resp = self.fetch("/events")

Callers

nothing calls this directly

Calls 2

fetchMethod · 0.95
get_jsonFunction · 0.70

Tested by

no test coverage detected