Changeset 10:d5329a2a05b7 in mailjam for postman/tests/mta.py


Ignore:
Timestamp:
May 20, 2012, 9:39:51 AM (12 years ago)
Author:
Borja Lopez <borja@…>
Branch:
default
Phase:
public
Message:

Fully added support for the configuration file. Now all the code uses
postman.conf to read the configuration parameters from it

Added a tests/postman.conf configuration file with specific configurtion
to use while testing (mostly tmp paths)

Updated the run_tests script to delete the temporary directory where
data is saved while running tests

Updated the tests modules/files so they use the tests config file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postman/tests/mta.py

    r5 r10  
    66from postman.models import Member, MailingList
    77
    8 
    98class TestSendmail(TestCase):
    109    def setUp(self):
    11         config = {'private': False, 'archive': '/tmp/postman-tests/archive',
    12                   'storage': '/tmp/postman-tests/storage'}
     10        self.configfile = os.path.join(os.path.dirname(__file__),
     11                                       'postman.conf')
    1312        self.mailing_list = MailingList('test_list', 'test_list@example.com',
    14                                         members={}, config=config)
     13                                        members={}, configfile=self.configfile)
    1514        self.member =  Member('test@example.com')
    1615        self.mta = Sendmail(self.mailing_list)
Note: See TracChangeset for help on using the changeset viewer.