We cannot use these asserts, becasue the returned value of res is:
ERROR: getfolder() asked for a nonexisting folder 'INBOX.OLItest'.
ERROR: Exceptions occurred during the run!
ERROR: getfolder() asked for a nonexisting folder 'INBOX.OLItest'.
So, if we have an assert, to compare if the string is empty,
the test stops here. We can check if we have or not folder in the
next check (count_maildir_mails().
We cannot use this assert, becasue the returned value of res is:
ERROR: getfolder() asked for a nonexisting folder 'INBOX.OLItest'.
ERROR: Exceptions occurred during the run!
ERROR: getfolder() asked for a nonexisting folder 'INBOX.OLItest'.
So, if we have an assert, to compare if the string is empty,
the test stops here. We can check if we have or not folder in the
next check (count_maildir_mails().
We cannot use this assert, becasue the returned value of res is:
ERROR: getfolder() asked for a nonexisting folder 'INBOX.OLItest'.
ERROR: Exceptions occurred during the run!
ERROR: getfolder() asked for a nonexisting folder 'INBOX.OLItest'.
So, if we have an assert, to compare if the string is empty,
the test stops here. We can check if we have or not folder in the
next check (count_maildir_mails().
We cannot use this assert, becasue the returned value of res is:
ERROR: Account test: no folder to sync (f[388 chars]\n\n' != ''
- ERROR: Account test: no folder to sync (folderfilter issue?)
- ERROR: Exceptions occurred during the run!
- ERROR: Account test: no folder to sync (folderfilter issue?)
So, if we have an assert to test if the string is empty,
the test stops here. We can check if we have or not folder
in the next check (count_maildir_mails().
This patch changes the test to use always strings and not bytes or
bytearrays.
Now the test runs fine.
Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
This patch change these errors in the test folder
C0121: Comparison to None should be 'expr is None' (singleton-comparison)
C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
Linux, Mac OSX. Outlook IMAP, Gmail. LOGIN, PLAIN, XOAUTH2. python 2.7, python 3.6!
Additional files required for Automated testing with Travis-CI and CodeCov.io!
Add gitter.im badge to README.
Signed-off-by: Chris Coleman/EspaceNetworks <chris001@users.noreply.github.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
It is more readable and returns a list therefore it is compatible both
with Python 2 and 3.
Signed-off-by: Łukasz Żarnowiecki <dolohow@outlook.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
an empty string appears after each literal string.
Signed-off-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Tuple are used for literal strings (see RFC3501 Section 4.3).
Signed-off-by: Pierre-Louis Bonicoli <pierre-louis.bonicoli@gmx.fr>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Make external API of class/module to be smaller, explicitely mark
all internal functions. Also annotate methods that are implemented
as the part of the parent class interface.
Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This eases testing of option values inside the code. This instance
is implemented as the read-only copy of the obtained 'options' object,
so callers won't be able to modify its contents.
Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
By default OfflineImap propagates new folders in both
directions. Sometimes this is not what you want. E.g. you might want
new folders on your IMAP server to propagate to your local MailDir,
but not the other way around. The 'readonly' setting on a repository
will not help here, as it prevents any change from occuring on that
repository. This is what the `createfolders` setting is for. By
default it is `True`, meaning that new folders can be created on this
repository. To prevent folders from ever being created on a
repository, set this to `False`. If you set this to False on the
REMOTE repository, you will not have to create the `Reverse
nametrans`_ rules on the LOCAL repository.
Also implement a test for this
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Add one test for each of the functions in offlineimap.imaputil, to make
sure they keep working. These functions tests the internal innards of
the offlineimap module rather than invoking offlineimap as a program.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
1) Fix test #4 by deleting all local mailfolders remaining from previous
tests, the mailfolder count will be off, otherwise.
2) Make folder deletion work in python3, it weirdly enough needs to be
quoted like this to work in python3 (I found a python bug about this
somewhere).
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This is the first test that actually creates a (local) email and
syncs. We check the result of the sync operation, to see if the
server has actually been assigning a proper UID to the email and
bail out if not.
This test therefore excercises our ability to properly detect the
new UID of an APPENDED email. Obviously we still need some
IMAP<->IMAP tests too, but since this is the same codepath being
used for APPENDs in that case, it could also help to detect
instabilities there.
In order to get this test in, the OLITestLib got a few new helper
functions:
- delete_maildir
- create_mail
- get_maildir_uids
The test passes here. I invoke it via:
python -m unittest test.tests.test_01_basic.TestBasicFunctions.test_04_createmail
or run python setup.py test, to run the whole suite.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Tests work now with python 3 with the exception of the deletion of remote
testfolders which fails for some reasons.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
We don't want to hammmer IMAP servers for the test series too much
to avoid being locked out. We will need a few tests to test
concurrent connections, but by default one connection should be fine.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>