1
0

utils_test.py 671 B

1234567891011121314151617181920212223
  1. from __future__ import absolute_import
  2. from __future__ import unicode_literals
  3. import unittest
  4. from compose.utils import unquote_path
  5. class UnquotePathTest(unittest.TestCase):
  6. def test_no_quotes(self):
  7. assert unquote_path('hello') == 'hello'
  8. def test_simple_quotes(self):
  9. assert unquote_path('"hello"') == 'hello'
  10. def test_uneven_quotes(self):
  11. assert unquote_path('"hello') == '"hello'
  12. assert unquote_path('hello"') == 'hello"'
  13. def test_nested_quotes(self):
  14. assert unquote_path('""hello""') == '"hello"'
  15. assert unquote_path('"hel"lo"') == 'hel"lo'
  16. assert unquote_path('"hello""') == 'hello"'