summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-26 14:37:54 +0100
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2012-12-26 14:37:54 +0100
commit844c8e9b1a4d21b79222d43f1fbef144f638cfb8 (patch)
treec30cd23a22a46507afb07baf38e532817fb608f4 /tests
parent3c66afa12004edaff6e28ad9092fce2e8b6b4b58 (diff)
downloadpykolab-844c8e9b1a4d21b79222d43f1fbef144f638cfb8.tar.gz
It is just as easy for purge_users() to call purge_imap()
Diffstat (limited to 'tests')
-rw-r--r--tests/functional/purge_users.py24
1 files changed, 2 insertions, 22 deletions
diff --git a/tests/functional/purge_users.py b/tests/functional/purge_users.py
index 1b18cb0..5bc1b82 100644
--- a/tests/functional/purge_users.py
+++ b/tests/functional/purge_users.py
@@ -13,25 +13,5 @@ def purge_users():
for user in users['list']:
wap_client.user_delete({'user': user})
- auth = Auth()
- domains = auth.list_domains()
-
- imap = IMAP()
- imap.connect()
-
- folders = []
-
- for domain,aliases in domains:
- folders.extend(imap.lm("user/%%@%s" % (domain)))
-
- for folder in folders:
- user = folder.replace('user/','')
-
- recipient = auth.find_recipient(user)
-
- if len(recipient) == 0 or recipient == []:
- try:
- imap.dm(folder)
- except:
- pass
-
+ from tests.functional.purge_imap import purge_imap
+ purge_imap()