aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
...
* | readfile: add a readfile_filter optionAldo Cortesi2018-04-141-39/+55
|/ | | | | | * Add a readfile_filter option that filters flows on read. * Adjust test suite for asyncio. * Add asynctest as a dev dependency.
* asyncio: ditch the handler contextAldo Cortesi2018-04-072-2/+4
| | | | | | | There are a few reasons for this. First, logs are now async, and can be called at any time. Second, the event loop is thread local, so there can only ever be one master per thread. These two things together completely obviate the need for a handler context.
* asyncio: remove master.add_log, in favor of a persistent log.Log instanceAldo Cortesi2018-04-071-1/+1
|
* asyncio: remove test master.has_logAldo Cortesi2018-04-076-28/+38
| | | | | Now that logs are async, using this call is almost always a mistake. Signal this by making it semi-private. The method may go away entirely down the track.
* asyncio: move log mechanism onto the event loopAldo Cortesi2018-04-0717-91/+114
| | | | | | Logs are now asynchronous, with a log entry pushed onto the event loop for handling. To support this, the test mechanism grows an await_log method that waits for a log entry to appear.
* asyncio simplify: we don't need a queue for proxy->main loop commsAldo Cortesi2018-04-078-63/+65
| | | | Instead, we just schedule coroutines directly onto the core loop.
* asyncio: remove last vestiage of channel input from masterAldo Cortesi2018-04-071-10/+9
|
* Merge pull request #3031 from itzikBraun/add-httpie-exportAldo Cortesi2018-04-061-1/+29
|\ | | | | added option to export request as httpie command
| * added option to export request as httpie commanditzikBraun2018-04-021-1/+29
| |
* | Merge pull request #2971 from kira0204/user-script-exceptionAldo Cortesi2018-04-061-3/+15
|\ \ | | | | | | A unified handler for user's scripts exception
| * | use error handler functionkira02042018-03-261-3/+3
| | |
| * | User script exception handler[squash]kira02042018-03-071-0/+12
| | | | | | | | | | | | | | | | | | fixing 2837, added test unified-function deleting the wrong commit
* | | fix http retry timeoutMaximilian Hils2018-04-051-38/+6
| | | | | | | | | | | | this fixes #3038
* | | minor fixesAldo Cortesi2018-04-032-10/+4
| | |
* | | asyncio: factor out test server startup waitAldo Cortesi2018-04-033-12/+7
| | |
* | | asyncio: cleanup and lintAldo Cortesi2018-04-022-2/+7
| | | | | | | | | | | | Also fix a racy websocket test.
* | | asyncio: test cleanupAldo Cortesi2018-04-023-8/+18
| | | | | | | | | | | | | | | | | | Also silence asyncio logs. We sometimes end up with messages on the queue that need to be ignored when the proxy shuts down, and asyncio complains loudly about this.
* | | asyncio: make http2 tests passAldo Cortesi2018-04-022-2/+6
| | |
* | | asyncio: fix a few remaining issues in proxy/test_server.pyAldo Cortesi2018-04-022-9/+14
| | |
* | | asyncio: fix channel interface and testsAldo Cortesi2018-04-012-19/+23
| | | | | | | | | | | | | | | We now need to synthesize a tick event when changing addons in tests, because tick is asynchronously called on the event loop.
* | | asyncio: start a test loop for unit testsAldo Cortesi2018-04-012-11/+3
| | | | | | | | | | | | | | | Also move signal handling out of master. These only work in the main thread, and properly belong in main.py.
* | | asyncio: clean up event loop acquisitionAldo Cortesi2018-04-011-80/+9
| | | | | | | | | | | | | | | | | | | | | We now acquire the event loop through asyncio.get_event_loop, avoiding having to pass the loop explicity in a bunch of places. This function does not return the currently running loop from within coroutines in versions of Python prior to 3.6.
* | | asyncio: brutally rip out our old queue mechanismAldo Cortesi2018-04-016-97/+106
| |/ |/|
* | Python 3.5 is dead -- long live Python 3.6!Thomas Kriechbaumer2018-03-313-19/+4
| | | | | | | | fixes #2266
* | fix Tornado 5.0 event loopThomas Kriechbaumer2018-03-241-0/+4
| | | | | | | | https://github.com/tornadoweb/tornado/issues/2183#issuecomment-371001254
* | don't crash if server address is unknown, fix #2969Maximilian Hils2018-03-232-0/+7
| |
* | bench: Add some very simple manual benchmarking helpersAldo Cortesi2018-03-176-0/+93
| | | | | | | | | | This includes a profiler addon that we might consider for promotion to a builtin down the track.
* | Merge pull request #2956 from kira0204/test-for-2850Maximilian Hils2018-03-151-0/+25
|\ \ | | | | | | Test for #2850
| * | adding commandkira02042018-03-121-3/+5
| | |
| * | Testing using addonkira02042018-03-121-11/+17
| | |
| * | fixing lintkira02042018-03-071-3/+3
| | |
| * | using assertskira02042018-03-071-0/+3
| | |
| * | wrong additionskira02042018-03-061-0/+14
| |/ | | | | | | | | | | | | | | | | | | test-for-2850 few fixes mock testing Typo error
* | Merge pull request #2945 from kajojify/shorteningAldo Cortesi2018-03-051-0/+28
|\ \ | | | | | | Polite shortening of statusbar messages. Fix #1433
| * | Minor fixes.Miroslav2018-03-031-12/+11
| | | | | | | | | | | | | | | | | | | | | Renaming prep_message method to shorten_message. Docstring. \u2026 instead of .... max_width parameter.
| * | Finalization of tests. Conditions rewritten again.Miroslav2018-03-021-19/+23
| | |
| * | Initial tests. New conditions.Miroslav2018-03-011-0/+25
| | |
* | | Merge pull request #2868 from kira0204/data-crashMaximilian Hils2018-03-041-2/+2
|\ \ \ | |_|/ |/| | Fix crashing when editing form with random data, fix #2794
| * | Testingkira02042018-02-191-1/+1
| | |
| * | Adding testkira02042018-02-161-1/+1
| | |
* | | clean up ProxyConfigMaximilian Hils2018-02-273-24/+20
| |/ |/| | | | | | | some of these options weren't even used anymore, others only in one place where it makes sense to use options directly.
* | Start consolidating core optionsAldo Cortesi2018-02-2610-98/+59
| | | | | | | | | | | | | | | | | | | | This is a preparatory patch that paves the way to consolidating our core options in the core addon. It amalgamates the core_option_validation and core addons, prepares the test suite for a world where options live in core, and moves over two trivial options as a trial balloon. From here, things will get harder, but at the end of the process we'll have a core that's responsive to options.
* | Split dumper_filter off from view_filterAldo Cortesi2018-02-262-6/+6
| | | | | | | | These don't even do the same thing.
* | Revamp verbosity optionsAldo Cortesi2018-02-265-6/+7
| | | | | | | | | | | | | | | | | | | | Split verbosity into termlog_verbosity and console_eventlog_verbosity. This patch also removes printing to console if there are unknown options in the command-line. Options now live in separate addons, so having uknown options remaining is common and expected. We definitely shoould have some other way for users to see what was ignored so they can catch typos and the like, but that's a different patch.
* | Merge pull request #2909 from fristonio/Fix-2867Aldo Cortesi2018-02-251-0/+9
|\ \ | | | | | | Fix test fails in test_xss_scanner when running tox without internet connection.
| * | Fix test fails in test_xss_scanner when running tox without internet ↵Deepesh Pathak2018-02-241-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | connections. - Add mock implementation for gethostbyname in test_xss_scanner. - Fix failed tests when running tox without internet connection. - Fixes #2867
* | | Misc. typosluz.paz2018-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Found via `codespell -q 3 -I ../mitmproxy-word-whitelist.txt` Where whitelist contains: ``` cas doubleclick nd ot seeked statics te thru ```
* | | Merge pull request #2907 from cortesi/optionscompAldo Cortesi2018-02-257-32/+18
|\ \ \ | |/ / |/| | Start moving more complicated options over to /addons
| * | addon options: proxyauth to /addonsAldo Cortesi2018-02-242-7/+8
| | |
| * | Split default_contentview into dumper_* and console_* varietiesAldo Cortesi2018-02-241-1/+1
| | | | | | | | | | | | | | | Then move the new options into their respective addons. This was a shared option, and things are much much simpler if it isn't.