Changeset View
Changeset View
Standalone View
Standalone View
tests/functional/test_kolabd/test_003_two_johns.py
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 TestKolabDaemon(unittest.TestCase): | class TestKolabDaemon(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() | ||||
@classmethod | @classmethod | ||||
def teardown_class(self, *args, **kw): | def teardown_class(self, *args, **kw): | ||||
Show All 24 Lines | def test_001_two_johns(self): | ||||
imap = IMAP() | imap = IMAP() | ||||
imap.connect() | imap.connect() | ||||
folders = imap.lm('user/john.doe@example.org') | folders = imap.lm('user/john.doe@example.org') | ||||
self.assertEqual(len(folders), 1, "No INBOX found for first John") | self.assertEqual(len(folders), 1, "No INBOX found for first John") | ||||
folders = imap.lm('user/john.doe2@example.org') | folders = imap.lm('user/john.doe2@example.org') | ||||
self.assertEqual(len(folders), 1, "No INBOX found for second John") | self.assertEqual(len(folders), 1, "No INBOX found for second John") | ||||