Changeset 16:cd4170142d87 in mailjam for mailjam/tests/mta.py
- Timestamp:
- May 22, 2012, 9:31:15 AM (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
mailjam/tests/mta.py
r15 r16 3 3 import os, sys, multiprocessing, time 4 4 from unittest import TestCase 5 from postman.mta import MTAClient6 from postman.daemon import PostmanDaemon7 from postman.models import Member, MailingList5 from mailjam.mta import MTAClient 6 from mailjam.daemon import MailjamDaemon 7 from mailjam.models import Member, MailingList 8 8 9 9 … … 11 11 """ 12 12 FIXME: These are dummy tests, they cover almost nothing from the 13 real postmanmta client (yet)13 real mailjam mta client (yet) 14 14 """ 15 15 def setUp(self): 16 16 self.mta_configfile = os.path.join(os.path.dirname(__file__), 17 ' postman-mta.conf')17 'mailjam-mta.conf') 18 18 self.configfile = os.path.join(os.path.dirname(__file__), 19 ' postman.conf')19 'mailjam.conf') 20 20 self.mailing_list = MailingList('test_list', 'test_list@example.com', 21 21 members={}, configfile=self.configfile) … … 28 28 29 29 def test___init__(self): 30 # in order to start mta client instances, we need to have a postman30 # in order to start mta client instances, we need to have a mailjam 31 31 # daemon running on the background 32 32 # This should be added to the setUp() method, but then it would be 33 33 # more difficult to terminate the process after all the methods 34 34 # were called 35 daemon = PostmanDaemon(self.configfile)35 daemon = MailjamDaemon(self.configfile) 36 36 daemon.port = 9100 37 37 p = multiprocessing.Process(target=daemon.run) … … 54 54 55 55 def test_get_raw_email(self): 56 # in order to start mta client instances, we need to have a postman56 # in order to start mta client instances, we need to have a mailjam 57 57 # daemon running on the background 58 58 # This should be added to the setUp() method, but then it would be 59 59 # more difficult to terminate the process after all the methods 60 60 # were called 61 daemon = PostmanDaemon(self.configfile)61 daemon = MailjamDaemon(self.configfile) 62 62 daemon.port = 9100 63 63 p = multiprocessing.Process(target=daemon.run) … … 88 88 # sys_stdin = sys.stdin 89 89 # sys.stdin = open(self.raw_email_file, 'r') 90 # self.mta.save_raw_email.filename = '/tmp/ postman-test-mta-save-raw-email'90 # self.mta.save_raw_email.filename = '/tmp/mailjam-test-mta-save-raw-email' 91 91 92 92
Note:
See TracChangeset
for help on using the changeset viewer.