summaryrefslogtreecommitdiffhomepage
path: root/test/test_python_application.py
diff options
context:
space:
mode:
authorAndrey Zelenkov <zelenkov@nginx.com>2018-01-15 19:59:47 +0300
committerAndrey Zelenkov <zelenkov@nginx.com>2018-01-15 19:59:47 +0300
commit819b43fc2da414c9132c6061eabf063ae08c36dc (patch)
tree1e0f292c207d491774542a8615041847cee9ecfa /test/test_python_application.py
parent263741fb445468eb7123bad0f7c46c1fdf6087a8 (diff)
downloadunit-819b43fc2da414c9132c6061eabf063ae08c36dc.tar.gz
unit-819b43fc2da414c9132c6061eabf063ae08c36dc.tar.bz2
Tests: use "data" parameter in Request() to send body.
Diffstat (limited to 'test/test_python_application.py')
-rw-r--r--test/test_python_application.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/test_python_application.py b/test/test_python_application.py
index a693002b..5066624a 100644
--- a/test/test_python_application.py
+++ b/test/test_python_application.py
@@ -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)),