def test_get_imap_folder_acl(self): coll = IMAPDataHandler() notification = { 'uri': 'imap://[email protected]@kolab.example.org/Calendar' } notification = json.loads(coll.get_imap_folder_acl(json.dumps(notification))) self.assertTrue(notification.has_key('acl')) self.assertIsInstance(notification['acl'], dict) self.assertEqual(notification['acl']['*****@*****.**'], 'lrswipkxtecdan')
def test_get_imap_folder_metadata(self): coll = IMAPDataHandler() notification = { 'uri': 'imap://[email protected]@kolab.example.org/Calendar' } notification = json.loads(coll.get_imap_folder_metadata(json.dumps(notification))) self.assertTrue(notification.has_key('metadata')) self.assertIsInstance(notification['metadata'], dict) self.assertEqual(notification['metadata']['/shared/vendor/kolab/folder-type'], 'event')