def test_encode_decode(self): """Encode and Decode should be able to run one on the result of the other and return the original""" original = URL(u'https://w3af.com:443/file.asp?id=1%202') encoded = original.url_encode() decoded = URL(encoded).url_decode() self.assertEqual(original, decoded)
def test_encode_decode(self): """Encode and Decode should be able to run one on the result of the other and return the original""" original = URL(u'https://w3af.com:443/file.asp?id=1%202') encoded = original.url_encode() decoded = URL(encoded).url_decode() self.assertEqual(original, decoded)
def test_url_encode_non_ascii(self): u = URL('http://w3af.com/foo/á.txt') self.assertEqual(u.url_encode(), u'http://w3af.com/foo/%C3%A1.txt')
def test_url_encode_non_ascii(self): u = URL('http://w3af.com/foo/á.txt') self.assertEqual(u.url_encode(), u'http://w3af.com/foo/%C3%A1.txt')