def test_gmail_folders_no_flags(monkeypatch):
 folders = [(('\\HasNoChildren',), '/', u'INBOX'), (('\\Noselect', '\\HasChildren'), '/', u'[Gmail]'), (('\\HasNoChildren', '\\All'), '/', u'[Gmail]/All Mail'), (('\\HasNoChildren', '\\Drafts'), '/', u'[Gmail]/Drafts'), (('\\HasNoChildren', '\\Important'), '/', u'[Gmail]/Important'), ('\\HasNoChildren', '/', u'[Gmail]/Sent Mail'), ('\\HasNoChildren', '/', u'[Gmail]/Spam'), (('\\Flagged', '\\HasNoChildren'), '/', u'[Gmail]/Starred'), ('\\HasNoChildren', '/', u'[Gmail]/Trash'), (('\\HasNoChildren',), '/', u'reference')]
 gmail_role_map = {'[Gmail]/All Mail': 'all', 'Inbox': 'inbox', '[Gmail]/Trash': 'trash', '[Gmail]/Spam': 'spam', '[Gmail]/Drafts': 'drafts', '[Gmail]/Sent Mail': 'sent', '[Gmail]/Important': 'important', '[Gmail]/Starred': 'starred', 'reference': None}
 client = patch_gmail_client(monkeypatch, folders)
 raw_folders = client.folders()
 generic_folder_checks(raw_folders, gmail_role_map, client, 'gmail')

def test_gmail_folders_no_flags ( monkeypatch ) : folders = [ ( ( '\\HasNoChildren' , ) , '/' , u'INBOX' ) , ( ( '\\Noselect' , '\\HasChildren' ) , '/' , u'[Gmail]' ) , ( ( '\\HasNoChildren' , '\\All' ) , '/' , u'[Gmail]/All Mail' ) , ( ( '\\HasNoChildren' , '\\Drafts' ) , '/' , u'[Gmail]/Drafts' ) , ( ( '\\HasNoChildren' , '\\Important' ) , '/' , u'[Gmail]/Important' ) , ( '\\HasNoChildren' , '/' , u'[Gmail]/Sent Mail' ) , ( '\\HasNoChildren' , '/' , u'[Gmail]/Spam' ) , ( ( '\\Flagged' , '\\HasNoChildren' ) , '/' , u'[Gmail]/Starred' ) , ( '\\HasNoChildren' , '/' , u'[Gmail]/Trash' ) , ( ( '\\HasNoChildren' , ) , '/' , u'reference' ) ] gmail_role_map = { '[Gmail]/All Mail' : 'all' , 'Inbox' : 'inbox' , '[Gmail]/Trash' : 'trash' , '[Gmail]/Spam' : 'spam' , '[Gmail]/Drafts' : 'drafts' , '[Gmail]/Sent Mail' : 'sent' , '[Gmail]/Important' : 'important' , '[Gmail]/Starred' : 'starred' , 'reference' : None } client = patch_gmail_client ( monkeypatch , folders ) raw_folders = client . folders ( ) generic_folder_checks ( raw_folders , gmail_role_map , client , 'gmail' )
tests that system folders without flags can be labeled .