Tests: use "data" parameter in Request() to send body.

This commit is contained in:
Andrey Zelenkov
2018-01-15 19:59:47 +03:00
parent 263741fb44
commit 819b43fc2d
2 changed files with 5 additions and 8 deletions

View File

@@ -59,9 +59,8 @@ def application(environ, start_response):
r = unit.TestUnitHTTP.post(headers={
'Host': 'localhost',
'Content-Type': 'text/html',
'Content-Length': str(len(body)),
'Custom-Header': 'blah'
}, body=body)
}, data=body)
self.assertEqual(r.status_code, 200, 'status')
self.assertEqual(r.headers['Content-Length'], str(len(body)),