Changeset 16:cd4170142d87 in mailjam for mailjam/tests/mta.py


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

Renamed the project to Mailjam

File:
1 moved

Legend:

Unmodified
Added
Removed
  • mailjam/tests/mta.py

    r15 r16  
    33import os, sys, multiprocessing, time
    44from unittest import TestCase
    5 from postman.mta import MTAClient
    6 from postman.daemon import PostmanDaemon
    7 from postman.models import Member, MailingList
     5from mailjam.mta import MTAClient
     6from mailjam.daemon import MailjamDaemon
     7from mailjam.models import Member, MailingList
    88
    99
     
    1111    """
    1212    FIXME: These are dummy tests, they cover almost nothing from the
    13     real postman mta client (yet)
     13    real mailjam mta client (yet)
    1414    """
    1515    def setUp(self):
    1616        self.mta_configfile = os.path.join(os.path.dirname(__file__),
    17                                            'postman-mta.conf')
     17                                           'mailjam-mta.conf')
    1818        self.configfile = os.path.join(os.path.dirname(__file__),
    19                                        'postman.conf')
     19                                       'mailjam.conf')
    2020        self.mailing_list = MailingList('test_list', 'test_list@example.com',
    2121                                        members={}, configfile=self.configfile)
     
    2828
    2929    def test___init__(self):
    30         # in order to start mta client instances, we need to have a postman
     30        # in order to start mta client instances, we need to have a mailjam
    3131        # daemon running on the background
    3232        # This should be added to the setUp() method, but then it would be
    3333        # more difficult to terminate the process after all the methods
    3434        # were called
    35         daemon = PostmanDaemon(self.configfile)
     35        daemon = MailjamDaemon(self.configfile)
    3636        daemon.port = 9100
    3737        p = multiprocessing.Process(target=daemon.run)
     
    5454
    5555    def test_get_raw_email(self):
    56         # in order to start mta client instances, we need to have a postman
     56        # in order to start mta client instances, we need to have a mailjam
    5757        # daemon running on the background
    5858        # This should be added to the setUp() method, but then it would be
    5959        # more difficult to terminate the process after all the methods
    6060        # were called
    61         daemon = PostmanDaemon(self.configfile)
     61        daemon = MailjamDaemon(self.configfile)
    6262        daemon.port = 9100
    6363        p = multiprocessing.Process(target=daemon.run)
     
    8888    #    sys_stdin = sys.stdin
    8989    #    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'
    9191   
    9292       
Note: See TracChangeset for help on using the changeset viewer.