def __str__(self): """ Return string representation. :return: string representation of the KeyValueContainer instance. """ return urlencode(self, encoding=self.encoding)
def __str__(self): """ Return string representation. :return: string representation of the DataContainer Object. """ return urlencode(self, encoding=self.encoding)
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='')
def __str__(self): """ :return: string representation of the QueryString object. """ return enc_dec.urlencode(self, encoding=self.encoding, safe='')
def test_tilde_case01(self): self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'latin1'), 'a=%E1&a=2')
def test_simple(self): self.assertEqual(urlencode(parse_qs(u'a=1&a=c'), 'latin1'), 'a=1&a=c')
def test_tilde_case02(self): self.assertEqual(urlencode(parse_qs(u'a=á&a=2'), 'utf-8'), 'a=%C3%A1&a=2')