aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/mitmproxy/test_fuzzing.py12
-rw-r--r--test/mitmproxy/tservers.py2
2 files changed, 3 insertions, 11 deletions
diff --git a/test/mitmproxy/test_fuzzing.py b/test/mitmproxy/test_fuzzing.py
index 905ba1cd..57d0ca55 100644
--- a/test/mitmproxy/test_fuzzing.py
+++ b/test/mitmproxy/test_fuzzing.py
@@ -25,14 +25,4 @@ class TestFuzzy(tservers.HTTPProxyTest):
p = self.pathoc()
with p.connect():
resp = p.request(req % self.server.port)
- assert resp.status_code == 400
-
- # def test_invalid_upstream(self):
- # req = r"get:'http://localhost:%s/p/200:i10,\x27+\x27'"
- # p = self.pathoc()
- # assert p.request(req % self.server.port).status_code == 502
-
- # def test_upstream_disconnect(self):
- # req = r'200:d0'
- # p = self.pathod(req)
- # assert p.status_code == 502
+ assert resp.status_code == 400 \ No newline at end of file
diff --git a/test/mitmproxy/tservers.py b/test/mitmproxy/tservers.py
index 7be31a28..9e6cef97 100644
--- a/test/mitmproxy/tservers.py
+++ b/test/mitmproxy/tservers.py
@@ -4,6 +4,7 @@ import tempfile
import sys
import time
from unittest import mock
+import asyncio
import mitmproxy.platform
from mitmproxy.addons import core
@@ -105,6 +106,7 @@ class ProxyThread(threading.Thread):
self.tmaster.shutdown()
def run(self):
+ asyncio.set_event_loop(asyncio.new_event_loop())
self.tmaster = self.masterclass(self.options)
self.tmaster.addons.add(core.Core())
self.name = "ProxyThread (%s:%s)" % (