Create mail in OLItest 1, sync, wipe folder sync Currently, this will mean the folder will be recreated locally. At some point when remote folder deletion is implemented, this behavior will change.
(self)
| 109 | |
| 110 | |
| 111 | def test_05_createmail(self): |
| 112 | """Create mail in OLItest 1, sync, wipe folder sync |
| 113 | |
| 114 | Currently, this will mean the folder will be recreated |
| 115 | locally. At some point when remote folder deletion is |
| 116 | implemented, this behavior will change.""" |
| 117 | OLITestLib.delete_remote_testfolders() |
| 118 | OLITestLib.delete_maildir('') #Delete all local maildir folders |
| 119 | OLITestLib.create_maildir('INBOX.OLItest') |
| 120 | OLITestLib.create_mail('INBOX.OLItest') |
| 121 | code, res = OLITestLib.run_OLI() |
| 122 | #logging.warn("%s %s "% (code, res)) |
| 123 | self.assertEqual(res, "") |
| 124 | boxes, mails = OLITestLib.count_maildir_mails('') |
| 125 | self.assertTrue((boxes, mails)==(1,1), msg="Expected 1 folders and 1 " |
| 126 | "mails, but sync led to {0} folders and {1} mails".format( |
| 127 | boxes, mails)) |
| 128 | # The local Mail should have been assigned a proper UID now, check! |
| 129 | uids = OLITestLib.get_maildir_uids('INBOX.OLItest') |
| 130 | self.assertFalse (None in uids, msg = "All mails should have been "+ \ |
| 131 | "assigned the IMAP's UID number, but {0} messages had no valid ID "\ |
| 132 | .format(len([None for x in uids if x==None]))) |
| 133 | |
| 134 | def test_06_createfolders(self): |
| 135 | """Test if createfolders works as expected |
nothing calls this directly
no test coverage detected