aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/utils/test_debug.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/mitmproxy/utils/test_debug.py b/test/mitmproxy/utils/test_debug.py
index 4371ef70..a8e1054d 100644
--- a/test/mitmproxy/utils/test_debug.py
+++ b/test/mitmproxy/utils/test_debug.py
@@ -11,13 +11,19 @@ from mitmproxy.utils import debug
def test_dump_system_info_precompiled(precompiled):
sys.frozen = None
with mock.patch.object(sys, 'frozen', precompiled):
- assert ("Precompiled Binary" in debug.dump_system_info()) == precompiled
+ assert ("binary" in debug.dump_system_info()) == precompiled
def test_dump_system_info_version():
with mock.patch('subprocess.check_output') as m:
+ m.return_value = b"v2.0.0-0-cafecafe"
+ x = debug.dump_system_info()
+ assert 'dev' not in x
+ assert 'cafecafe' in x
+
+ with mock.patch('subprocess.check_output') as m:
m.side_effect = subprocess.CalledProcessError(-1, 'git describe --tags --long')
- assert 'release version' in debug.dump_system_info()
+ assert 'dev' not in debug.dump_system_info()
def test_dump_info():