aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-11 16:13:22 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-15 15:51:01 +0200
commita0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e (patch)
treecf3b842c1ad8f7a75d6eb2ffa8063b5385407b5a /test
parent30fbf57e4b72e3947c323d98aee7b2d44663e33c (diff)
downloadmitmproxy-a0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e.tar.gz
mitmproxy-a0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e.tar.bz2
mitmproxy-a0d8afd0fcc3c678da0dc956c5a80d4e07d5ac3e.zip
http2: add request-response to pathod
Diffstat (limited to 'test')
-rw-r--r--test/test_language_http2.py3
-rw-r--r--test/test_pathoc.py7
2 files changed, 4 insertions, 6 deletions
diff --git a/test/test_language_http2.py b/test/test_language_http2.py
index de3e5cf9..3c751fd1 100644
--- a/test/test_language_http2.py
+++ b/test/test_language_http2.py
@@ -1,5 +1,6 @@
import cStringIO
+from netlib import tcp
from libpathod import language
from libpathod.language import http2, base
import netlib
@@ -64,7 +65,7 @@ class TestRequest:
s,
language.Settings(
request_host = "foo.com",
- protocol = netlib.http2.HTTP2Protocol(None)
+ protocol = netlib.http2.HTTP2Protocol(tcp.TCPClient(('localhost', 1234)))
)
)
diff --git a/test/test_pathoc.py b/test/test_pathoc.py
index e1e1fe97..d39f9275 100644
--- a/test/test_pathoc.py
+++ b/test/test_pathoc.py
@@ -230,9 +230,6 @@ class TestDaemon(_TestDaemon):
class TestDaemonHTTP2(_TestDaemon):
ssl = True
- ssloptions = pathod.SSLOptions(
- alpn_select = http2.HTTP2Protocol.ALPN_PROTO_H2,
- )
def test_http2(self):
c = pathoc.Pathoc(
@@ -270,5 +267,5 @@ class TestDaemonHTTP2(_TestDaemon):
use_http2 = True,
)
c.connect()
- resp = c.request("get:/api/info")
- assert tuple(json.loads(resp.content)["version"]) == version.IVERSION
+ resp = c.request("get:/p/200")
+ assert resp.status_code == "200"