]> granicus.if.org Git - python/commitdiff
test_utils_quote_unquote(): Test for unquote() properly
authorBarry Warsaw <barry@python.org>
Wed, 11 Sep 2002 02:31:24 +0000 (02:31 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 11 Sep 2002 02:31:24 +0000 (02:31 +0000)
de-backslash-ifying.

Lib/email/test/test_email.py

index 0fe304b3323a4c22fa514bd1ca0e853d7668c05d..95eb0e86b72effb2750f685a42253517ad52bc07 100644 (file)
@@ -1673,6 +1673,13 @@ class TestMiscellaneous(unittest.TestCase):
            [('Al Person', 'aperson@dom.ain'),
             ('Bud Person', 'bperson@dom.ain')])
 
+    def test_utils_quote_unquote(self):
+        eq = self.assertEqual
+        msg = Message()
+        msg.add_header('content-disposition', 'attachment',
+                       filename='foo\\wacky"name')
+        eq(msg.get_filename(), 'foo\\wacky"name')
+
 
 \f
 # Test the iterator/generators