diff options
author | David Rousselie <dax@happycoders.org> | 2007-06-06 22:47:04 +0400 |
---|---|---|
committer | David Rousselie <dax@happycoders.org> | 2007-06-06 22:47:04 +0400 |
commit | 60782526ce1b01606fa0ac35cd80c30472d48b3b (patch) | |
tree | ce83f8e1ad2179ee9106d642fcd3d67c89836d38 /src/jmc/model/tests | |
parent | 5c28a05b1be59f3dc4e61cff7c8d52c797e7e541 (diff) |
Add bare JID as third argument to register post functions
darcs-hash:20070606184704-86b55-6795169def44ccfdfab56f781030d94eb5ef57ac.gz
Diffstat (limited to 'src/jmc/model/tests')
-rw-r--r-- | src/jmc/model/tests/account.py | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/jmc/model/tests/account.py b/src/jmc/model/tests/account.py index 99aa526..d078e0f 100644 --- a/src/jmc/model/tests/account.py +++ b/src/jmc/model/tests/account.py @@ -33,7 +33,8 @@ from jcl.model import account from jcl.model.account import Account, PresenceAccount from jmc.model.account import MailAccount, POP3Account, IMAPAccount, SMTPAccount -from jcl.model.tests.account import Account_TestCase, PresenceAccount_TestCase +from jcl.model.tests.account import Account_TestCase, \ + PresenceAccount_TestCase, InheritableAccount_TestCase from jmc.model.tests import email_generator, server if sys.platform == "win32": @@ -145,11 +146,7 @@ class MailAccount_TestCase(PresenceAccount_TestCase): u"Encoded multipart3 with no charset (éàê)\n", \ u"encoded from (éàê)")) - def test_get_register_fields(self): - register_fields = MailAccount.get_register_fields() - self.assertEquals(len(register_fields), 15) - -class POP3Account_TestCase(unittest.TestCase): +class POP3Account_TestCase(InheritableAccount_TestCase): def setUp(self): if os.path.exists(DB_PATH): os.unlink(DB_PATH) @@ -167,6 +164,7 @@ class POP3Account_TestCase(unittest.TestCase): self.pop3_account.port = 1110 self.pop3_account.ssl = False del account.hub.threadConnection + self.account_class = POP3Account def tearDown(self): account.hub.threadConnection = connectionForURI('sqlite://' + DB_URL) @@ -275,11 +273,7 @@ class POP3Account_TestCase(unittest.TestCase): u"mymessage\n", \ u"user@test.com"))) - def test_get_register_fields(self): - register_fields = POP3Account.get_register_fields() - self.assertEquals(len(register_fields), 15) - -class IMAPAccount_TestCase(unittest.TestCase): +class IMAPAccount_TestCase(InheritableAccount_TestCase): def setUp(self): if os.path.exists(DB_PATH): os.unlink(DB_PATH) @@ -297,6 +291,7 @@ class IMAPAccount_TestCase(unittest.TestCase): self.imap_account.port = 1143 self.imap_account.ssl = False del account.hub.threadConnection + self.account_class = IMAPAccount def tearDown(self): account.hub.threadConnection = connectionForURI('sqlite://' + DB_URL) @@ -383,15 +378,11 @@ class IMAPAccount_TestCase(unittest.TestCase): lambda self: self.assertEquals(self.imap_account.get_mail(1), \ (u"From : None\nSubject : None\n\nbody text\r\n\n", \ u"None"))) - - def test_get_register_fields(self): - register_fields = IMAPAccount.get_register_fields() - self.assertEquals(len(register_fields), 16) class SMTPAccount_TestCase(Account_TestCase): - def test_get_register_fields(self): - register_fields = SMTPAccount.get_register_fields() - self.assertEquals(len(register_fields), 8) + def setUp(self): + Account_TestCase.setUp(self) + self.account_class = SMTPAccount def suite(): suite = unittest.TestSuite() |