diff options
author | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2012-12-26 14:36:49 +0100 |
---|---|---|
committer | Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> | 2012-12-26 14:36:49 +0100 |
commit | 3c66afa12004edaff6e28ad9092fce2e8b6b4b58 (patch) | |
tree | 471e107cd3b4ee8485f82d764789921743f94c2e /tests/functional | |
parent | e2fe4e32e8864cde22c4e38adb5cd1058aca2f89 (diff) | |
download | pykolab-3c66afa12004edaff6e28ad9092fce2e8b6b4b58.tar.gz |
Add purge_imap() because sometimes you will want to end up with a clean IMAP server
Diffstat (limited to 'tests/functional')
-rw-r--r-- | tests/functional/purge_imap.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/functional/purge_imap.py b/tests/functional/purge_imap.py new file mode 100644 index 0000000..d3827a4 --- /dev/null +++ b/tests/functional/purge_imap.py @@ -0,0 +1,15 @@ +import pykolab + +from pykolab import wap_client +from pykolab.imap import IMAP + +conf = pykolab.getConf() + +def purge_imap(): + imap = IMAP() + imap.connect() + for folder in imap.lm(): + try: + imap.dm(folder) + except: + pass |