Revision: 8222
http://svn.sourceforge.net/mailman/?rev=8222&view=rev
Author: bwarsaw
Date: 2007-05-21 20:08:55 -0700 (Mon, 21 May 2007)
Log Message:
-----------
Add a bunch of flush()'s to fix the rest of the existing doctests.
Modified Paths:
--------------
branches/exp-elixir-branch/Mailman/docs/addresses.txt
branches/exp-elixir-branch/Mailman/docs/use-usermanager.txt
branches/exp-elixir-branch/Mailman/docs/users.txt
Modified: branches/exp-elixir-branch/Mailman/docs/addresses.txt
===================================================================
--- branches/exp-elixir-branch/Mailman/docs/addresses.txt 2007-05-19
23:27:17 UTC (rev 8221)
+++ branches/exp-elixir-branch/Mailman/docs/addresses.txt 2007-05-22
03:08:55 UTC (rev 8222)
@@ -14,8 +14,8 @@
manager. To get things started, access the global user manager and create a
new roster.
+ >>> from Mailman.database import flush
>>> from Mailman.configuration import config
- >>> from Mailman.database import flush
>>> mgr = config.user_manager
>>> roster_1 = mgr.create_roster('roster-1')
>>> sorted(roster_1.addresses)
@@ -51,6 +51,7 @@
second roster.
>>> roster_2 = mgr.create_roster('roster-2')
+ >>> flush()
>>> sorted(roster_2.addresses)
[]
>>> for address in roster_1.addresses:
@@ -139,5 +140,5 @@
>>> for roster in mgr.rosters:
... mgr.delete_roster(roster)
>>> flush()
- >>> list(mgr.rosters)
+ >>> sorted(roster.name for roster in mgr.rosters)
[]
Modified: branches/exp-elixir-branch/Mailman/docs/use-usermanager.txt
===================================================================
--- branches/exp-elixir-branch/Mailman/docs/use-usermanager.txt 2007-05-19
23:27:17 UTC (rev 8221)
+++ branches/exp-elixir-branch/Mailman/docs/use-usermanager.txt 2007-05-22
03:08:55 UTC (rev 8222)
@@ -29,12 +29,14 @@
You create a roster to hold users. The only thing a roster needs is a name,
basically just an identifying string.
+ >>> from Mailman.database import flush
>>> from Mailman.interfaces import IRoster
>>> roster = mgr.create_roster('roster-1')
>>> IRoster.providedBy(roster)
True
>>> roster.name
'roster-1'
+ >>> flush()
If you try to create a roster with the same name as an existing roster, you
will get an exception.
@@ -51,10 +53,13 @@
Delete the roster, and you can then create it again.
>>> mgr.delete_roster(roster)
+ >>> flush()
>>> roster = mgr.create_roster('roster-1')
+ >>> flush()
>>> roster.name
'roster-1'
+
Retrieving a roster
-------------------
@@ -85,6 +90,7 @@
>>> roster_2 = mgr.create_roster('roster-2')
>>> roster_3 = mgr.create_roster('roster-3')
>>> roster_4 = mgr.create_roster('roster-4')
+ >>> flush()
>>> sorted(roster.name for roster in mgr.rosters)
['', 'roster-1', 'roster-2', 'roster-3', 'roster-4']
Modified: branches/exp-elixir-branch/Mailman/docs/users.txt
===================================================================
--- branches/exp-elixir-branch/Mailman/docs/users.txt 2007-05-19 23:27:17 UTC
(rev 8221)
+++ branches/exp-elixir-branch/Mailman/docs/users.txt 2007-05-22 03:08:55 UTC
(rev 8222)
@@ -12,8 +12,8 @@
Users are managed by the IUserManager. Users don't have any unique
identifying information, and no such id is needed to create them.
+ >>> from Mailman.database import flush
>>> from Mailman.configuration import config
- >>> from Mailman.database import flush
>>> mgr = config.user_manager
>>> user = mgr.create_user()
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe:
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org