summaryrefslogtreecommitdiffstats
path: root/tests/functional/purge_users.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functional/purge_users.py')
-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()