summaryrefslogtreecommitdiffstats
path: root/tests/functional/test_wap_client/test_002_user_add.py
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2016-05-04 15:53:48 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2016-05-04 15:53:48 +0200
commitc204eaaa2c9a006432fe00489a352833143db01d (patch)
tree18860f2e335b9a98d34f404d5c4b81d22f2ce222 /tests/functional/test_wap_client/test_002_user_add.py
parent4a24e0cc403321713ee1201ade9d36956da1c060 (diff)
downloadpykolab-c204eaaa2c9a006432fe00489a352833143db01d.tar.gz
CS fixes according to PEP8 (ignored mostly line-length errors only)
Summary: . Reviewers: #pykolab_developers Differential Revision: https://git.kolab.org/D134
Diffstat (limited to 'tests/functional/test_wap_client/test_002_user_add.py')
-rw-r--r--tests/functional/test_wap_client/test_002_user_add.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/functional/test_wap_client/test_002_user_add.py b/tests/functional/test_wap_client/test_002_user_add.py
index 96c3de1..771e700 100644
--- a/tests/functional/test_wap_client/test_002_user_add.py
+++ b/tests/functional/test_wap_client/test_002_user_add.py
@@ -8,6 +8,7 @@ from pykolab.imap import IMAP
conf = pykolab.getConf()
+
class TestUserAdd(unittest.TestCase):
@classmethod
@@ -31,7 +32,6 @@ class TestUserAdd(unittest.TestCase):
purge_users()
def test_001_inbox_created(self):
-
time.sleep(2)
imap = IMAP()
imap.connect()
@@ -67,14 +67,12 @@ class TestUserAdd(unittest.TestCase):
metadata = imap.get_metadata(folder)
folder_name = '/'.join(folder.split('/')[2:]).split('@')[0]
- if ac_folders.has_key(folder_name):
- if ac_folders[folder_name].has_key('annotations'):
- for _annotation in ac_folders[folder_name]['annotations'].keys():
+ if folder_name in ac_folders:
+ if 'annotations' in ac_folders[folder_name]:
+ for _annotation in ac_folders[folder_name]['annotations']:
if _annotation.startswith('/private/'):
continue
_annotation_value = ac_folders[folder_name]['annotations'][_annotation]
- self.assertTrue(metadata[metadata.keys().pop()].has_key(_annotation))
+ self.assertTrue(_annotation in metadata[metadata.keys().pop()])
self.assertEqual(_annotation_value, metadata[metadata.keys().pop()][_annotation])
-
-