diff options
| author | Barry Warsaw | 2009-08-12 23:10:43 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-08-12 23:10:43 -0400 |
| commit | 129dc2580ff5d0def7b5e5fcf95af53c7f9685de (patch) | |
| tree | e9f263b09f7a1dcf0b3e9b599f736095172bf159 /src | |
| parent | b10a4def1b672c872a8e458ba36e5a2123613b0b (diff) | |
| download | mailman-129dc2580ff5d0def7b5e5fcf95af53c7f9685de.tar.gz mailman-129dc2580ff5d0def7b5e5fcf95af53c7f9685de.tar.zst mailman-129dc2580ff5d0def7b5e5fcf95af53c7f9685de.zip | |
Add more tests for the 'mailman create' command.
Diffstat (limited to 'src')
| -rw-r--r-- | src/mailman/commands/docs/create.txt | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/mailman/commands/docs/create.txt b/src/mailman/commands/docs/create.txt index 4416ab070..681ac074c 100644 --- a/src/mailman/commands/docs/create.txt +++ b/src/mailman/commands/docs/create.txt @@ -43,3 +43,58 @@ Now both the domain and the mailing list exist in the database. >>> IDomainManager(config).get('example.xx') <Domain example.xx, base_url: http://example.xx, contact_address: postmaster@example.xx> + +You can also create mailing lists in existing domains without the +auto-creation flag. + + >>> args.domain = False + >>> args.listname = ['test1@example.com'] + >>> command.process(args) + Created mailing list: test1@example.com + + >>> config.db.list_manager.get('test1@example.com') + <mailing list "test1@example.com" at ...> + +The command can also operate quietly. + + >>> args.quiet = True + >>> args.listname = ['test2@example.com'] + >>> command.process(args) + + >>> config.db.list_manager.get('test2@example.com') + <mailing list "test2@example.com" 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 = ['test3@example.com'] + >>> args.language = 'it' + >>> command.process(args) + Created mailing list: test3@example.com + + >>> mlist = config.db.list_manager.get('test3@example.com') + >>> 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: test3@example.com + +The posting address of the mailing list must be valid. + + >>> args.listname = ['foo'] + >>> command.process(args) + Illegal list name: foo |
