def test_imap_folders_no_flags(monkeypatch, constants):
 folders = [(('\\HasNoChildren',), '/', u'INBOX'), (('\\Noselect', '\\HasChildren'), '/', u'SKIP'), (('\\HasNoChildren', '\\Drafts'), '/', u'Drafts'), ('\\HasNoChildren', '/', u'Sent'), ('\\HasNoChildren', '/', u'Sent Items'), (('\\HasNoChildren', '\\Junk'), '/', u'Spam'), ('\\HasNoChildren', '/', u'Trash'), (('\\HasNoChildren',), '/', u'reference')]
 role_map = {'INBOX': 'inbox', 'Trash': 'trash', 'Drafts': 'drafts', 'Sent': 'sent', 'Sent Items': 'sent', 'Spam': 'spam', u'[Gmail]/Sent Mail': None, u'[Gmail]/Trash': 'trash', u'reference': None}
 client = patch_generic_client(monkeypatch, folders)
 raw_folders = client.folders()
 generic_folder_checks(raw_folders, role_map, client, 'imap')

def test_imap_folders_no_flags ( monkeypatch , constants ) : folders = [ ( ( '\\HasNoChildren' , ) , '/' , u'INBOX' ) , ( ( '\\Noselect' , '\\HasChildren' ) , '/' , u'SKIP' ) , ( ( '\\HasNoChildren' , '\\Drafts' ) , '/' , u'Drafts' ) , ( '\\HasNoChildren' , '/' , u'Sent' ) , ( '\\HasNoChildren' , '/' , u'Sent Items' ) , ( ( '\\HasNoChildren' , '\\Junk' ) , '/' , u'Spam' ) , ( '\\HasNoChildren' , '/' , u'Trash' ) , ( ( '\\HasNoChildren' , ) , '/' , u'reference' ) ] role_map = { 'INBOX' : 'inbox' , 'Trash' : 'trash' , 'Drafts' : 'drafts' , 'Sent' : 'sent' , 'Sent Items' : 'sent' , 'Spam' : 'spam' , u'[Gmail]/Sent Mail' : None , u'[Gmail]/Trash' : 'trash' , u'reference' : None } client = patch_generic_client ( monkeypatch , folders ) raw_folders = client . folders ( ) generic_folder_checks ( raw_folders , role_map , client , 'imap' )
tests that system folders without flags can be labeled .