wsgi/test/unittest_wsgi.py
changeset 9946 ec88c1a1904a
parent 9944 9b3b21b7ff3e
child 9988 623707a0c404
--- a/wsgi/test/unittest_wsgi.py	Thu Aug 21 22:42:48 2014 +0200
+++ b/wsgi/test/unittest_wsgi.py	Wed Sep 10 21:28:33 2014 +0200
@@ -1,3 +1,5 @@
+# encoding=utf-8
+
 import webtest.app
 from StringIO import StringIO
 
@@ -76,6 +78,13 @@
 
         self.assertEqual([u'1', u'2'], req.form['arg'])
 
+    def test_post_unicode_urlencoded(self):
+        params = 'arg=%C3%A9'
+        r = webtest.app.TestRequest.blank(
+            '/', POST=params, content_type='application/x-www-form-urlencoded')
+        req = CubicWebWsgiRequest(r.environ, self.vreg)
+        self.assertEqual(u"é", req.form['arg'])
+
     @classmethod
     def init_config(cls, config):
         super(WSGIAppTC, cls).init_config(config)