Beispiel #1
0
 def test_parse_qs_ascii(self):
     query = ('a=1&' 'b=1&' 'b=2&' 'c=1&' 'c=2&' 'c=3')
     environ = {'QUERY_STRING': uri.quote(query)}
     self.assert_equal(uri.parse_qs(environ), {
         'a': ['1'],
         'b': ['1', '2'],
         'c': ['1', '2', '3']
     })
Beispiel #2
0
 def test_parse_qs_utf_8(self):
     query = (u'\u3044=\u58f1&'
              u'\u308d=\u58f1&'
              u'\u308d=\u5f10&'
              u'\u306f=\u58f1&'
              u'\u306f=\u5f10&'
              u'\u306f=\u53c2')
     environ = {'QUERY_STRING': uri.quote(query)}
     self.assert_equal(uri.parse_qs(environ),
                       {u'\u3044': [u'\u58f1'],
                        u'\u308d': [u'\u58f1', u'\u5f10'],
                        u'\u306f': [u'\u58f1', u'\u5f10', u'\u53c2']})
Beispiel #3
0
 def test_parse_qs_ascii(self):
     query = ('a=1&'
              'b=1&'
              'b=2&'
              'c=1&'
              'c=2&'
              'c=3')
     environ = {'QUERY_STRING': uri.quote(query)}
     self.assert_equal(uri.parse_qs(environ),
                       {'a': ['1'],
                        'b': ['1', '2'],
                        'c': ['1', '2', '3']})
Beispiel #4
0
 def test_parse_qs_utf_8(self):
     query = (u'\u3044=\u58f1&'
              u'\u308d=\u58f1&'
              u'\u308d=\u5f10&'
              u'\u306f=\u58f1&'
              u'\u306f=\u5f10&'
              u'\u306f=\u53c2')
     environ = {'QUERY_STRING': uri.quote(query)}
     self.assert_equal(
         uri.parse_qs(environ), {
             u'\u3044': [u'\u58f1'],
             u'\u308d': [u'\u58f1', u'\u5f10'],
             u'\u306f': [u'\u58f1', u'\u5f10', u'\u53c2']
         })
Beispiel #5
0
 def test_parse_qs_empty(self):
     environ = {}
     self.assert_equal(uri.parse_qs(environ), {})
Beispiel #6
0
 def test_parse_qs_empty(self):
     environ = {}
     self.assert_equal(uri.parse_qs(environ), {})