Changeset View
Changeset View
Standalone View
Standalone View
tests/functional/test_wap_client/test_007_policy_uid.py
from ConfigParser import RawConfigParser | from ConfigParser import RawConfigParser | ||||
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 TestPolicyUid(unittest.TestCase): | class TestPolicyUid(unittest.TestCase): | ||||
def remove_option(self, section, option): | def remove_option(self, section, option): | ||||
self.config.remove_option(section, option) | self.config.remove_option(section, option) | ||||
fp = open(conf.config_file, "w") | fp = open(conf.config_file, "w") | ||||
self.config.write(fp) | self.config.write(fp) | ||||
fp.close() | fp.close() | ||||
▲ Show 20 Lines • Show All 147 Lines • ▼ Show 20 Lines | def test_006_lowercase_givenname_surname(self): | ||||
user = auth.find_recipient('john.doe@example.org') | user = auth.find_recipient('john.doe@example.org') | ||||
user_info = wap_client.user_info(user) | user_info = wap_client.user_info(user) | ||||
self.assertEqual(user_info['uid'], "john.doe") | self.assertEqual(user_info['uid'], "john.doe") | ||||
from tests.functional.purge_users import purge_users | from tests.functional.purge_users import purge_users | ||||
purge_users() | purge_users() | ||||