]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Added namespace test for when folder_encode is off
authorMenno Smits <menno@freshfoo.com>
Tue, 30 Dec 2014 09:24:56 +0000 (22:24 +1300)
committerMenno Smits <menno@freshfoo.com>
Tue, 30 Dec 2014 09:24:56 +0000 (22:24 +1300)
imapclient/test/test_imapclient.py

index 35aec72bc264df71f1f4fa510d01a552864285a9..45003c3c2338007b9ab3223b6268d7c0fe3e13f1 100644 (file)
@@ -423,6 +423,11 @@ class TestNamespace(IMAPClientTest):
         self.set_return(b'(("&AP8-." "/")) NIL NIL')
         self.assertEqual(self.client.namespace(), ((('\xff.', '/'),), None, None))
 
+    def test_without_folder_decoding(self):
+        self.set_return(b'(("&AP8-." "/")) NIL NIL')
+        self.client.folder_encode = False
+        self.assertEqual(self.client.namespace(), (((b'&AP8-.', '/'),), None, None))
+
     def test_other_only(self):
         self.set_return(b'NIL NIL (("" "."))')
         self.assertEqual(self.client.namespace(), (None, None, (("", "."),)))