aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2013-06-18 00:53:38 +0200
committerMaximilian Hils <git@maximilianhils.com>2013-06-18 00:53:38 +0200
commitca9740df20a804043f236861278cfe70014b5d57 (patch)
tree66cb5174c191b07d475a0713103915662bb20e12
parentd462b444b7eed04927e77d8971d4b218459fdee3 (diff)
downloadmitmproxy-ca9740df20a804043f236861278cfe70014b5d57.tar.gz
mitmproxy-ca9740df20a804043f236861278cfe70014b5d57.tar.bz2
mitmproxy-ca9740df20a804043f236861278cfe70014b5d57.zip
skip tests on windows that don't make sense
-rw-r--r--test/test_proxy.py1
-rw-r--r--test/tutils.py10
2 files changed, 10 insertions, 1 deletions
diff --git a/test/test_proxy.py b/test/test_proxy.py
index 5828d077..ed47dbac 100644
--- a/test/test_proxy.py
+++ b/test/test_proxy.py
@@ -133,6 +133,7 @@ class TestProcessProxyOptions:
class TestProxyServer:
+ @tutils.SkipWindows # binding to 0.0.0.0:1 works without special permissions on Windows
def test_err(self):
parser = argparse.ArgumentParser()
cmdline.common_options(parser)
diff --git a/test/tutils.py b/test/tutils.py
index fbce615a..e42256ed 100644
--- a/test/tutils.py
+++ b/test/tutils.py
@@ -2,7 +2,15 @@ import os, shutil, tempfile
from contextlib import contextmanager
from libmproxy import flow, utils, controller
from netlib import certutils
-import mock
+from nose.plugins.skip import SkipTest
+
+def _SkipWindows():
+ raise SkipTest("Skipped on Windows.")
+def SkipWindows(fn):
+ if os.name == "nt":
+ return _SkipWindows
+ else:
+ return fn
def treq(conn=None):
if not conn: