Changeset View
Changeset View
Standalone View
Standalone View
tests/functional/test_wap_client/test_005_user_add_de_CH.py
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
import time | import time | ||||
import unittest | import unittest | ||||
import pykolab | import pykolab | ||||
from pykolab import wap_client | from pykolab import wap_client | ||||
from pykolab.auth import Auth | from pykolab.auth import Auth | ||||
from pykolab.imap import IMAP | from pykolab.imap import IMAP | ||||
conf = pykolab.getConf() | conf = pykolab.getConf() | ||||
class TestUserAddDeCH(unittest.TestCase): | class TestUserAddDeCH(unittest.TestCase): | ||||
@classmethod | @classmethod | ||||
def setup_class(self, *args, **kw): | def setup_class(self, *args, **kw): | ||||
from tests.functional.purge_users import purge_users | from tests.functional.purge_users import purge_users | ||||
purge_users() | purge_users() | ||||
self.user = { | self.user = { | ||||
'local': 'thomas.bruederli', | 'local': 'thomas.bruederli', | ||||
Show All 21 Lines | class TestUserAddDeCH(unittest.TestCase): | ||||
def test_002_fr_FR_user_recipient_policy(self): | def test_002_fr_FR_user_recipient_policy(self): | ||||
auth = Auth() | auth = Auth() | ||||
auth.connect() | auth.connect() | ||||
recipient = auth.find_recipient("%(local)s@%(domain)s" % (self.user)) | recipient = auth.find_recipient("%(local)s@%(domain)s" % (self.user)) | ||||
if hasattr(self, 'assertIsInstance'): | if hasattr(self, 'assertIsInstance'): | ||||
self.assertIsInstance(recipient, str) | self.assertIsInstance(recipient, str) | ||||
self.assertEqual(recipient, "uid=bruederli,ou=People,dc=example,dc=org") | self.assertEqual(recipient, "uid=bruederli,ou=People,dc=example,dc=org") | ||||
Lint: PEP8 E501: line too long (80 > 79 characters) | |||||
result = wap_client.user_info(recipient) | result = wap_client.user_info(recipient) | ||||
self.assertEqual(result['mail'], 'thomas.bruederli@example.org') | self.assertEqual(result['mail'], 'thomas.bruederli@example.org') | ||||
self.assertEqual(sorted(result['alias']), ['bruederli@example.org', 't.bruederli@example.org']) | self.assertEqual(sorted(result['alias']), ['bruederli@example.org', 't.bruederli@example.org']) | ||||
Lint: PEP8 E501 line too long (103 > 79 characters) Lint: PEP8 E501: line too long (103 > 79 characters) | |||||
line too long (80 > 79 characters)