Update web-platform-tests to revision d647a1bc742a533186d8297cae2a2bee669c7780

This commit is contained in:
WPT Sync Bot 2018-10-11 21:45:52 -04:00
parent bf192caf4b
commit 4cf0a092d0
41 changed files with 897 additions and 487 deletions

View file

@ -9,7 +9,7 @@ import unittest
from six.moves.urllib.parse import urlencode, urlunsplit
from six.moves.urllib.request import Request as BaseRequest
from six.moves.urllib.request import urlopen
from six import binary_type, iteritems
from six import binary_type, iteritems, PY3
from hyper import HTTP20Connection, tls
import ssl
@ -79,6 +79,11 @@ class TestUsingServer(unittest.TestCase):
return urlopen(req)
def assert_multiple_headers(self, resp, name, values):
if PY3:
assert resp.info().get_all(name) == values
else:
assert resp.info()[name] == ", ".join(values)
@pytest.mark.skipif(not wptserve.utils.http2_compatible(), reason="h2 server only works in python 2.7.15")
class TestUsingH2Server:

View file

@ -35,10 +35,9 @@ class TestHeader(TestUsingServer):
resp = self.request("/document.txt", query="pipe=header(Content-Type,FAIL)|header(Content-Type,text/html)")
self.assertEqual(resp.info()["Content-Type"], "text/html")
@pytest.mark.xfail(sys.version_info >= (3,), reason="wptserve only works on Py2")
def test_multiple_append(self):
resp = self.request("/document.txt", query="pipe=header(X-Test,1)|header(X-Test,2,True)")
self.assertEqual(resp.info()["X-Test"], "1, 2")
self.assert_multiple_headers(resp, "X-Test", ["1", "2"])
class TestSlice(TestUsingServer):
def test_both_bounds(self):