Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt istr #1015

Merged
merged 14 commits into from
Jul 29, 2016
Prev Previous commit
Next Next commit
Fix web response tests
  • Loading branch information
asvetlov committed Jul 29, 2016
commit 27435f744a4dc6dbe5c37f1eb712454f2d2c7503
14 changes: 7 additions & 7 deletions tests/test_web_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,8 +814,8 @@ def append(data):
yield from resp.prepare(req)
yield from resp.write_eof()
txt = buf.decode('utf8')
assert re.match('HTTP/1.1 200 OK\r\nCONTENT-LENGTH: 0\r\n'
'DATE: .+\r\nSERVER: .+\r\n\r\n', txt)
assert re.match('HTTP/1.1 200 OK\r\nContent-Length: 0\r\n'
'Date: .+\r\nServer: .+\r\n\r\n', txt)


@pytest.mark.run_loop
Expand All @@ -836,8 +836,8 @@ def append(data):
yield from resp.prepare(req)
yield from resp.write_eof()
txt = buf.decode('utf8')
assert re.match('HTTP/1.1 200 OK\r\nCONTENT-LENGTH: 4\r\n'
'DATE: .+\r\nSERVER: .+\r\n\r\ndata', txt)
assert re.match('HTTP/1.1 200 OK\r\nContent-Length: 4\r\n'
'Date: .+\r\nServer: .+\r\n\r\ndata', txt)


@pytest.mark.run_loop
Expand All @@ -859,9 +859,9 @@ def append(data):
yield from resp.prepare(req)
yield from resp.write_eof()
txt = buf.decode('utf8')
assert re.match('HTTP/1.1 200 OK\r\nCONTENT-LENGTH: 0\r\n'
'SET-COOKIE: name=value\r\n'
'DATE: .+\r\nSERVER: .+\r\n\r\n', txt)
assert re.match('HTTP/1.1 200 OK\r\nContent-Length: 0\r\n'
'Set-Cookie: name=value\r\n'
'Date: .+\r\nServer: .+\r\n\r\n', txt)


def test_set_text_with_content_type():
Expand Down