Esempio n. 1
0
    def __str__(self):
        """
        Return string representation.

        :return: string representation of the KeyValueContainer instance.
        """
        return urlencode(self, encoding=self.encoding)
Esempio n. 2
0
    def __str__(self):
        """
        Return string representation.

        :return: string representation of the DataContainer Object.
        """
        return urlencode(self, encoding=self.encoding)
Esempio n. 3
0
    def __str__(self):
        """
        Return string representation.

        :return: string representation of the KeyValueContainer instance.
        """
        return urlencode(self, encoding=self.encoding)
Esempio n. 4
0
    def __str__(self):
        """
        Return string representation.

        :return: string representation of the DataContainer Object.
        """
        return urlencode(self, encoding=self.encoding)
Esempio n. 5
0
    def __str__(self):
        """
        This method returns a string representation of the Form object.

        Please note that if the form has radio/select/checkboxes the
        first value will be put into the string representation and the
        others will be lost.

        :see: Unittest in test_form.py
        :return: string representation of the Form object.
        """
        d = dict()
        d.update(self.items())

        for key in d:
            key_type = self.get_parameter_type(key, default=None)
            if key_type in self.AVOID_STR_DUPLICATES:
                d[key] = d[key][:1]

        return urlencode(d, encoding=self.encoding, safe='')
Esempio n. 6
0
    def __str__(self):
        """
        This method returns a string representation of the Form object.

        Please note that if the form has radio/select/checkboxes the
        first value will be put into the string representation and the
        others will be lost.

        :see: Unittest in test_form.py
        :return: string representation of the Form object.
        """
        d = dict()
        d.update(self.items())

        for key in d:
            key_type = self.get_parameter_type(key, default=None)
            if key_type in self.AVOID_STR_DUPLICATES:
                d[key] = d[key][:1]

        return urlencode(d, encoding=self.encoding, safe='')
Esempio n. 7
0
 def __str__(self):
     """
     :return: string representation of the QueryString object.
     """
     return enc_dec.urlencode(self, encoding=self.encoding, safe='')
Esempio n. 8
0
 def test_tilde_case01(self):
     self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'latin1'),
                      'a=%E1&a=2')
Esempio n. 9
0
 def test_simple(self):
     self.assertEqual(urlencode(parse_qs(u'a=1&a=c'), 'latin1'), 'a=1&a=c')
Esempio n. 10
0
 def test_tilde_case02(self):
     self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'utf-8'),
                      'a=%C3%A1&a=2')
Esempio n. 11
0
 def test_simple(self):
     self.assertEqual(urlencode(parse_qs(u'a=1&a=c'), 'latin1'), 'a=1&a=c')
Esempio n. 12
0
 def test_tilde_case02(self):
     self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'utf-8'), 'a=%C3%A1&a=2')
Esempio n. 13
0
 def test_tilde_case01(self):
     self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'latin1'), 'a=%E1&a=2')
Esempio n. 14
0
 def __str__(self):
     """
     :return: string representation of the QueryString object.
     """
     return enc_dec.urlencode(self, encoding=self.encoding, safe='')