Commit Graph

4 Commits

Author SHA1 Message Date
Anatoli Babenia
cff98a30e2
Fix HAR dump (#4439)
* Fix `KeyError: 'Unknown options: hardump'` in HAR test_simple

The reason was an invalid import of `connections` which is gone
in d159897d98, but the loading error
was silently ignored (#4438) resulting in a misleading exception
at a later stage.

This still doesn't make the test suite run, because it is better
to fix one error at a time.

The way to run tests from examples.

    ln -sr test/conftest.py examples
    pytest examples/contrib/test_har_dump.py -k simpl

The way to see the execution flow with silenced exceptions.

    from hunter import trace, Q
    trace(Q(stdlib=False), ~Q(filename_contains='site-packages'))

* Fix `TypeError: invoke() takes 3 positional arguments but 4 were given`

* Fix `TypeError: 'bool' object is not callable`
2021-02-11 21:07:09 +01:00
Anatoli Babenia
00f718e6c0
Fix location for contrib har_dump.py in its test (#4424)
To run the test, I had to copy `conftest.py` to examples.

    cp test/conftest.py examples
    pytest examples/contrib/test_har_dump.py

This fixes the `fixture 'tdata' not found` error.
2021-02-03 18:52:56 +01:00
Thomas Kriechbaumer
38cca379df pyupgrade --py36-plus mitmproxy/**/*.py 2020-11-20 19:25:26 +01:00
Maximilian Hils
08895e9ba6 restructure examples
- restructure examples (fix #4031)
 - remove example dependencies from setup.py,
   we do not need special dependencies for our supported addons.
 - unify how we generate docs from code
 - improve example docs
2020-06-23 16:00:14 +02:00