Merge "Supplement a unit test case for 'unquote_header_value'"

This commit is contained in:
Zuul 2023-12-21 08:39:19 +00:00 committed by Gerrit Code Review
commit 05ea4afdc7

View File

@ -20,3 +20,15 @@ class TestUrlMap(unittest.TestCase):
def setUp(self):
self.urlmap = urlmap
super(TestUrlMap, self).setUp()
def test_unquote_header_value(self):
result = self.urlmap.unquote_header_value('')
self.assertEqual(result, '')
result = self.urlmap.unquote_header_value('test')
self.assertEqual(result, 'test')
result = self.urlmap.unquote_header_value('"test"')
self.assertEqual(result, 'test')
result = self.urlmap.unquote_header_value('"test')
self.assertEqual(result, '"test')
result = self.urlmap.unquote_header_value('test"')
self.assertEqual(result, 'test"')