Update of /cvsroot/mailman/mailman3/src/mailman/tests
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv800

Modified Files:
      Tag: 3.0
        test_members.py 
Log Message:
Bumping file rev to 3.0 and minor cosmetic.


--- NEW FILE: test_members.py ---
# Copyright (C) 2004 Barry A. Warsaw
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 2 of the License, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place - Suite 330, Boston, MA 02111-1307, USA.

"""Test backend member ops on any backend which implements IUserStorage.
"""

import os
import unittest

from mailman import startup
from mailman.config import configuration
from mailman.dbmgr import dbmgr
from mailman.interfaces.profile import DeliveryMode



class TestMembers(unittest.TestCase):
    def setUp(self):
        self._addr = '[EMAIL PROTECTED]'
        self._domain = 'myTestDomain'

    def test_create_user(self):
        eq = self.assertEqual
        unless = self.failUnless
        # create a new blank user
        user = dbmgr.users.create_user(self._domain)



def test_suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(TestMembers))
    return suite



if __name__ == '__main__':
    here = os.path.abspath(os.path.dirname(__file__))
    mmroot = os.path.normpath(os.path.join(here, '../../..'))
    conffile = os.path.normpath(os.path.join(mmroot,
                                             'etc/backendtest.conf'))
    configuration.configure(conffile)
    # after the above line, dbmgr should know about our backend.
    # now call everyone's initializer
    startup.startup()
    unittest.main()


_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
Unsubscribe: http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to