Add test for encoding text/plain in forms

This commit is contained in:
Keith Yeung 2016-05-01 03:13:42 -04:00
parent d1c0af9ae7
commit 5e078870a2
2 changed files with 26 additions and 0 deletions

View file

@ -4,6 +4,11 @@ def main(request, response):
return 'OK'
else:
return 'FAIL'
elif request.headers.get('Content-Type') == 'text/plain':
if request.body == 'qux=baz\r\n':
return 'OK'
else:
return 'FAIL'
else:
if request.POST.first('foo') == 'bar':
return 'OK'