summaryrefslogtreecommitdiffstats
path: root/tests/functional/test_kolabd/test_001_user_sync.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_kolabd/test_001_user_sync.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_kolabd/test_001_user_sync.py')
-rw-r--r--tests/functional/test_kolabd/test_001_user_sync.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/functional/test_kolabd/test_001_user_sync.py b/tests/functional/test_kolabd/test_001_user_sync.py
index 671188a..e8c804d 100644
--- a/tests/functional/test_kolabd/test_001_user_sync.py
+++ b/tests/functional/test_kolabd/test_001_user_sync.py
@@ -8,6 +8,7 @@ from pykolab.imap import IMAP
conf = pykolab.getConf()
+
class TestKolabDaemon(unittest.TestCase):
@classmethod
def setup_class(self, *args, **kw):
@@ -61,7 +62,7 @@ class TestKolabDaemon(unittest.TestCase):
result = wap_client.user_info(recipient)
- if not result.has_key('mailhost'):
+ if 'mailhost' not in result:
from tests.functional.synchronize import synchronize_once
synchronize_once()
@@ -106,14 +107,14 @@ class TestKolabDaemon(unittest.TestCase):
print metadata
folder_name = '/'.join(folder.split('/')[2:]).split('@')[0]
- if ac_folders.has_key(folder_name):
- if ac_folders[folder_name].has_key('annotations'):
+ if folder_name in ac_folders:
+ if 'annotations' in ac_folders[folder_name]:
for _annotation in ac_folders[folder_name]['annotations'].keys():
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])
def test_006_user_subscriptions(self):
@@ -137,4 +138,3 @@ class TestKolabDaemon(unittest.TestCase):
def test_013_resource_mailbox_annotation(self):
pass
-