Example #1
0
def test_www_strencode():
    pairs = [
        (u'Test String', b'Test String'),
        (u'', b''),
        (u'\u00b5ACD', b'uACD'),
        (u'\u00b11323', b'+/-1323'),
    ]
    for inp, outp in pairs:
        assert www.strencode(inp) == outp
Example #2
0
def test_www_strencode():
    pairs = [
        (u'Test String', b'Test String'),
        (u'', b''),
        (u'\u00b5ACD', b'uACD'),
        (u'\u00b11323', b'+/-1323'),
    ]
    for inp, outp in pairs:
        assert www.strencode(inp) == outp
Example #3
0
 def _get_description(soup):
     desc_cell = soup.find("tr", id=re.compile("trSku"))
     strings = []
     for string in desc_cell.stripped_strings:
         strings.append(string)
     return www.strencode(strings[1])
Example #4
0
 def _get_description(soup):
     desc_cell = soup.find('tr', id=re.compile('trSku'))
     strings = []
     for string in desc_cell.stripped_strings:
         strings.append(string)
     return www.strencode(strings[1])