From 7c44204fb428577f4f588dc3ad02cd8a10c238f9 Mon Sep 17 00:00:00 2001 From: zhuyawei Date: Tue, 24 Oct 2023 14:43:31 +0800 Subject: [PATCH] Supplement a unit test case for 'unquote_header_value' the test case for api.urlmap Change-Id: Iab8036b5fa7ed9d927088938b90e0219e4db08b8 --- venus/tests/unit/api/test_urlmap.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/venus/tests/unit/api/test_urlmap.py b/venus/tests/unit/api/test_urlmap.py index 6503537..58644d4 100644 --- a/venus/tests/unit/api/test_urlmap.py +++ b/venus/tests/unit/api/test_urlmap.py @@ -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"')