mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
305b133c59
Summary: Biggest change is turning everything to unicode Test Plan: The tests Reviewers: dsagal, paulfitz Reviewed By: dsagal Differential Revision: https://phab.getgrist.com/D2875
20 lines
579 B
Python
20 lines
579 B
Python
# coding=utf-8
|
|
import unittest
|
|
import urllib
|
|
|
|
import six
|
|
|
|
from urllib_patch import original_quote
|
|
|
|
|
|
class TestUrllibPatch(unittest.TestCase):
|
|
def test_patched_quote(self):
|
|
self.assertEqual(urllib.quote( "a b"), u"a%20b")
|
|
self.assertEqual(urllib.quote(u"a b"), u"a%20b")
|
|
self.assertEqual(urllib.quote(u"a é"), u"a%20%C3%A9")
|
|
|
|
self.assertEqual(original_quote( "a b"), u"a%20b")
|
|
self.assertEqual(original_quote(u"a b"), u"a%20b")
|
|
if six.PY3: # python 2 original quote can't handle non-ascii
|
|
self.assertEqual(original_quote(u"a é"), u"a%20%C3%A9")
|