------------------------------------------------------------
revno: 6768
committer: Barry Warsaw <[email protected]>
branch nick: 3.0
timestamp: Wed 2009-08-12 23:10:43 -0400
message:
  Add more tests for the 'mailman create' command.
modified:
  src/mailman/commands/docs/create.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/docs/create.txt'
--- src/mailman/commands/docs/create.txt	2009-08-13 02:52:53 +0000
+++ src/mailman/commands/docs/create.txt	2009-08-13 03:10:43 +0000
@@ -43,3 +43,58 @@
     >>> IDomainManager(config).get('example.xx')
     <Domain example.xx, base_url: http://example.xx,
             contact_address: [email protected]>
+
+You can also create mailing lists in existing domains without the
+auto-creation flag.
+
+    >>> args.domain = False
+    >>> args.listname = ['[email protected]']
+    >>> command.process(args)
+    Created mailing list: [email protected]
+
+    >>> config.db.list_manager.get('[email protected]')
+    <mailing list "[email protected]" at ...>
+
+The command can also operate quietly.
+
+    >>> args.quiet = True
+    >>> args.listname = ['[email protected]']
+    >>> command.process(args)
+
+    >>> config.db.list_manager.get('[email protected]')
+    <mailing list "[email protected]" 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.
+
+    >>> config.languages.add('it', 'iso-8859-1', 'Italian')
+
+    >>> args.quiet = False
+    >>> args.listname = ['[email protected]']
+    >>> args.language = 'it'
+    >>> command.process(args)
+    Created mailing list: [email protected]
+
+    >>> mlist = config.db.list_manager.get('[email protected]')
+    >>> print mlist.preferred_language
+    <Language [it] Italian>
+    >>> args.language = None
+
+
+Errors
+======
+
+You cannot create a mailing list that already exists.
+
+    >>> command.process(args)
+    List already exists: [email protected]
+
+The posting address of the mailing list must be valid.
+
+    >>> args.listname = ['foo']
+    >>> command.process(args)
+    Illegal list name: foo

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

Reply via email to