Changeset 6:2a0f6f8cbc52 in mailjam for postman/tests


Ignore:
Timestamp:
May 18, 2012, 12:59:55 PM (12 years ago)
Author:
Francisco de Borja Lopez Rio <borja@…>
Branch:
default
Phase:
public
Message:

Added an initial version of the code that will handle the XMLRPC interface
of the server.

Added a script to start the server (not fully functional yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • postman/tests/daemon.py

    r5 r6  
    11# -*- coding: utf-8 -*-
    22
    3 import os
     3import os, xmlrpclib
    44from unittest import TestCase
    55from postman.daemon import Postman
     
    121121        # Clear the files created by the tests
    122122        postman.clear()
     123
     124
     125class TestPostmanDaemon(TestCase):
     126    """
     127    postman.daemon.PostmanDaemon tests.
     128   
     129    """
     130    def setUp(self):
     131        config = {'private': False, 'archive': '/tmp/postman-tests/archive',
     132                  'storage': '/tmp/postman-tests/storage'}
     133        self.mailing_list = MailingList('test_xmlrpc', 'test_xmlrpc@example.com',
     134                                        members={}, config=config)
     135        self.member =  Member('test@example.com')
     136        # FIXME: Hardcoded url here, should be picked from a config file
     137       
     138        self.link = xmlrpclib.ServerProxy('http://localhost:9000')
Note: See TracChangeset for help on using the changeset viewer.