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 exceptions tests
  • Loading branch information
asvetlov committed Jul 29, 2016
commit dc407234c3e6c01b1f64b3c6883fb1dcd98a51bd
28 changes: 14 additions & 14 deletions tests/test_web_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ def test_HTTPOk(buf, request):
yield from resp.write_eof()
txt = buf.decode('utf8')
assert re.match(('HTTP/1.1 200 OK\r\n'
'CONTENT-TYPE: text/plain; charset=utf-8\r\n'
'CONTENT-LENGTH: 7\r\n'
'DATE: .+\r\n'
'SERVER: .+\r\n\r\n'
'Content-Type: text/plain; charset=utf-8\r\n'
'Content-Length: 7\r\n'
'Date: .+\r\n'
'Server: .+\r\n\r\n'
'200: OK'), txt)


Expand Down Expand Up @@ -91,11 +91,11 @@ def test_HTTPFound(buf, request):
yield from resp.write_eof()
txt = buf.decode('utf8')
assert re.match('HTTP/1.1 302 Found\r\n'
'CONTENT-TYPE: text/plain; charset=utf-8\r\n'
'CONTENT-LENGTH: 10\r\n'
'LOCATION: /redirect\r\n'
'DATE: .+\r\n'
'SERVER: .+\r\n\r\n'
'Content-Type: text/plain; charset=utf-8\r\n'
'Content-Length: 10\r\n'
'Location: /redirect\r\n'
'Date: .+\r\n'
'Server: .+\r\n\r\n'
'302: Found', txt)


Expand All @@ -117,11 +117,11 @@ def test_HTTPMethodNotAllowed(buf, request):
yield from resp.write_eof()
txt = buf.decode('utf8')
assert re.match('HTTP/1.1 405 Method Not Allowed\r\n'
'CONTENT-TYPE: text/plain; charset=utf-8\r\n'
'CONTENT-LENGTH: 23\r\n'
'ALLOW: POST,PUT\r\n'
'DATE: .+\r\n'
'SERVER: .+\r\n\r\n'
'Content-Type: text/plain; charset=utf-8\r\n'
'Content-Length: 23\r\n'
'Allow: POST,PUT\r\n'
'Date: .+\r\n'
'Server: .+\r\n\r\n'
'405: Method Not Allowed', txt)


Expand Down