Skip to content

Commit

Permalink
Merge pull request mitmproxy#1864 from cortesi/tdocs
Browse files Browse the repository at this point in the history
Addon test docs, remove stray deprecated events
  • Loading branch information
cortesi authored Dec 16, 2016
2 parents c4929bb + 007aeef commit fc724b6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
17 changes: 17 additions & 0 deletions docs/scripting/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,23 @@ purposes. You can use it as follows:
:language: python


Testing
-------

Mitmproxy includes a number of helpers for testing addons. The
``mitmproxy.test.taddons`` module contains a context helper that takes care of
setting up and tearing down the addon event context. The
``mitmproxy.test.tflow`` module contains helpers for quickly creating test
flows. Pydoc is the canonical reference for these modules, and mitmproxy's own
test suite is an excellent source of examples of usage. Here, for instance, is
the mitmproxy unit tests for the `anticache` option, demonstrating a good
cross-section of the test helpers:

.. literalinclude:: ../../test/mitmproxy/addons/test_anticache.py
:caption: :src:`test/mitmproxy/addons/test_anticache.py`
:language: python


Developing scripts
------------------

Expand Down
3 changes: 0 additions & 3 deletions mitmproxy/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
"responseheaders",
"error",

"intercept",
"resume",

"websocket_handshake",
"websocket_start",
"websocket_message",
Expand Down

0 comments on commit fc724b6

Please sign in to comment.