diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/test_eventsequence.py | 2 | ||||
-rw-r--r-- | test/mitmproxy/test_version.py | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/test/mitmproxy/test_eventsequence.py b/test/mitmproxy/test_eventsequence.py index 6e254225..fe0f92b3 100644 --- a/test/mitmproxy/test_eventsequence.py +++ b/test/mitmproxy/test_eventsequence.py @@ -53,5 +53,5 @@ def test_tcp_flow(err): def test_invalid(): - with pytest.raises(ValueError): + with pytest.raises(TypeError): next(eventsequence.iterate(42)) diff --git a/test/mitmproxy/test_version.py b/test/mitmproxy/test_version.py new file mode 100644 index 00000000..f87b0851 --- /dev/null +++ b/test/mitmproxy/test_version.py @@ -0,0 +1,10 @@ +import runpy + +from mitmproxy import version + + +def test_version(capsys): + runpy.run_module('mitmproxy.version', run_name='__main__') + stdout, stderr = capsys.readouterr() + assert len(stdout) > 0 + assert stdout.strip() == version.VERSION |