------------------------------------------------------------
revno: 6769
committer: Barry Warsaw <[email protected]>
branch nick: 3.0
timestamp: Wed 2009-08-12 23:53:34 -0400
message:
  Tests for setting an owner and the language.  A test for notifications, and
  errors.  Update newlist.txt.
modified:
  src/mailman/commands/cli_lists.py
  src/mailman/commands/docs/create.txt
  src/mailman/templates/en/newlist.txt


--
lp:mailman
https://code.launchpad.net/~mailman-coders/mailman/3.0

Your team Mailman Checkins is subscribed to branch lp:mailman.
To unsubscribe from this branch go to 
https://code.launchpad.net/~mailman-coders/mailman/3.0/+edit-subscription.
=== modified file 'src/mailman/commands/cli_lists.py'
--- src/mailman/commands/cli_lists.py	2009-08-13 02:52:53 +0000
+++ src/mailman/commands/cli_lists.py	2009-08-13 03:53:34 +0000
@@ -212,7 +212,7 @@
             # the old translation context is just (healthy? :) paranoia.
             with using_language(mlist.preferred_language.code):
                 msg = UserNotification(
-                    owner_mail, mlist.no_reply_address,
+                    args.owners, mlist.no_reply_address,
                     _('Your new mailing list: $fqdn_listname'),
                     text, mlist.preferred_language)
                 msg.send(mlist)

=== modified file 'src/mailman/commands/docs/create.txt'
--- src/mailman/commands/docs/create.txt	2009-08-13 03:10:43 +0000
+++ src/mailman/commands/docs/create.txt	2009-08-13 03:53:34 +0000
@@ -61,16 +61,58 @@
     >>> args.listname = ['[email protected]']
     >>> command.process(args)
 
-    >>> config.db.list_manager.get('[email protected]')
+    >>> mlist = config.db.list_manager.get('[email protected]')
+    >>> mlist
     <mailing list "[email protected]" at ...>
 
 
+Setting the owner
+=================
+
+By default, no list owners are specified.
+
+    >>> print list(mlist.owners.addresses)
+    []
+
+But you can specify an owner address on the command line when you create the
+mailing list.
+
+    >>> args.quiet = False
+    >>> args.listname = ['[email protected]']
+    >>> args.owners = ['[email protected]']
+    >>> command.process(args)
+    Created mailing list: [email protected]
+
+    >>> mlist = config.db.list_manager.get('[email protected]')
+    >>> print list(mlist.owners.addresses)
+    [<Address: [email protected] [not verified] at ...>]
+
+You can even specify more than one address for the owners.
+
+    >>> args.owners = ['[email protected]', '[email protected]', '[email protected]']
+    >>> args.listname = ['[email protected]']
+    >>> command.process(args)
+    Created mailing list: [email protected]
+
+    >>> mlist = config.db.list_manager.get('[email protected]')
+    >>> from operator import attrgetter
+    >>> print sorted(mlist.owners.addresses, key=attrgetter('address'))
+    [<Address: [email protected] [not verified] at ...>,
+     <Address: [email protected] [not verified] at ...>,
+     <Address: [email protected] [not verified] at ...>]
+
+
 Setting the language
 ====================
 
 You can set the default language for the new mailing list when you create it.
 The language must be known to Mailman.
 
+    >>> args.listname = ['[email protected]']
+    >>> args.language = 'it'
+    >>> command.process(args)
+    Invalid language code: it
+
     >>> config.languages.add('it', 'iso-8859-1', 'Italian')
 
     >>> args.quiet = False
@@ -85,13 +127,60 @@
     >>> args.language = None
 
 
+Notifications
+=============
+
+When told to, Mailman will notify the list owners of their new mailing list.
+
+    >>> args.listname = ['[email protected]']
+    >>> args.notify = True
+    >>> command.process(args)
+    Created mailing list: [email protected]
+
+The notification message is in the virgin queue.
+
+    >>> from mailman.testing.helpers import get_queue_messages
+    >>> messages = get_queue_messages('virgin')
+    >>> len(messages)
+    1
+
+    >>> for message in messages:
+    ...     print message.msg.as_string()
+    MIME-Version: 1.0
+    ...
+    Subject: Your new mailing list: [email protected]
+    From: [email protected]
+    To: [email protected], [email protected], [email protected]
+    ...
+    <BLANKLINE>
+    The mailing list '[email protected]' has just been created for you.
+    The following is some basic information about your mailing list.
+    <BLANKLINE>
+    You can configure your mailing list at the following web page:
+    <BLANKLINE>
+        http://lists.example.com/admin/[email protected]
+    <BLANKLINE>
+    The web page for users of your mailing list is:
+    <BLANKLINE>
+        http://lists.example.com/listinfo/[email protected]
+    <BLANKLINE>
+    There is also an email-based interface for users (not administrators)
+    of your list; you can get info about using it by sending a message
+    with just the word 'help' as subject or in the body, to:
+    <BLANKLINE>
+        [email protected]
+    <BLANKLINE>
+    Please address all questions to [email protected].
+    <BLANKLINE>
+
+
 Errors
 ======
 
 You cannot create a mailing list that already exists.
 
     >>> command.process(args)
-    List already exists: [email protected]
+    List already exists: [email protected]
 
 The posting address of the mailing list must be valid.
 

=== modified file 'src/mailman/templates/en/newlist.txt'
--- src/mailman/templates/en/newlist.txt	2001-08-04 02:11:17 +0000
+++ src/mailman/templates/en/newlist.txt	2009-08-13 03:53:34 +0000
@@ -1,35 +1,18 @@
-The mailing list `%(listname)s' has just been created for you.  The
+The mailing list '$listname' has just been created for you.  The
 following is some basic information about your mailing list.
 
-Your mailing list password is:
-
-    %(password)s
-
-You need this password to configure your mailing list.  You also need
-it to handle administrative requests, such as approving mail if you
-choose to run a moderated list.
-
 You can configure your mailing list at the following web page:
 
-    %(admin_url)s
+    $admin_url
 
 The web page for users of your mailing list is: 
 
-    %(listinfo_url)s
-
-You can even customize these web pages from the list configuration
-page.  However, you do need to know HTML to be able to do this.
-
-There is also an email-based interface for users (not administrators)
-of your list; you can get info about using it by sending a message
-with just the word `help' as subject or in the body, to:
-
-    %(requestaddr)s
-
-To unsubscribe a user: from the mailing list 'listinfo' web page,
-click on or enter the user's email address as if you were that user.
-Where that user would put in their password to unsubscribe, put in
-your admin password.  You can also use your password to change
-member's options, including digestification, delivery disabling, etc.
-
-Please address all questions to %(siteowner)s.
+    $listinfo_url
+
+There is also an email-based interface for users (not administrators) of your
+list; you can get info about using it by sending a message with just the word
+'help' as subject or in the body, to:
+
+    $requestaddr
+
+Please address all questions to $siteowner.

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

Reply via email to