[Mailman3-dev] added interface to subscription
barry at python.org
Sat May 1 11:39:52 EDT 2004
On Fri, 2004-04-30 at 23:35, Michael Kato wrote:
> I've added the interface to subscriptions. I also have been reworking
> the tests to work better with test.py. Most of the tests that are
> valid are now working with both backends.
Excellent, thanks Maki.
> To test the berkley backend,
> the bakendtest.conf needs to look like:
> path $vardir/listdb
> path $vardir/userdb
> storage lists bdblist
> storage users bdbuser
> # <stubuser/>
> # <stublist/>
> # storage lists stublist
> # storage users stubuser
> Maybe soon I'll get around to fixing the test.py to take a conf file
> that then does the right thing. It seems to be running by chance
> because mailman/stubbackend/tests/test_config2.py is the first test
> file run, and happens to load a config that is then reused. I just
> discovered this and thought it was funny(that test.py runs by chance)
Not funny, "ha ha", but funny "heh, we should fix that" :)
The other thing we need is a Berkeley test conf file that will point to
different databases, so they can't affect any read operational databases
that might be in place.
We probably want a different test.conf file for each backend storage
combination we want to test. E.g. bdb-test.conf and stub-test.conf.
Then the test infrastructure could be used to choose which one to use.
I'm thinking that the stub backend would be the default, but you could
provide a --confs="stub bdb" or --confs="all" switch to have the
specified backends tested.
The other key point is that for unit tests, we need to arrange so that
each test is performed independently of any other test. Probably we
should write a base test class that does the right thing in its setUp()
and tearDown() to delete any databases (or clear them out) between
tests. It'll be much faster to do that in the stub backend.
P.S. you're right that mailman/interface/users.py is obsolete. I
haven't removed it yet because it provides some valuable documentation
More information about the Mailman3-Dev