Commit ad498e26 authored by Tim Peters's avatar Tim Peters

Beefed up the tests a bit.

parent e82f0feb
......@@ -50,7 +50,7 @@ Trying to insert a database with a name that is already in use will not work:
... database_name='root',
... databases=db.databases)
Traceback (most recent call last):
... fancy traceback here ...
...
ValueError: database_name 'root' already in databases
You can (still) get a connection to a database this way:
......@@ -79,6 +79,29 @@ True
>>> len(cn2.connections)
2
So long as this database group remains open, the same Connection objects
are returned:
>>> cn.get_connection('root') is cn
True
>>> cn.get_connection('notroot') is cn2
True
>>> cn2.get_connection('root') is cn
True
>>> cn2.get_connection('notroot') is cn2
True
Of course trying to get a non-existent named database doesn't work:
>>> cn.get_connection('no way')
Traceback (most recent call last):
...
KeyError: 'no way'
Clean up:
>>> for a_db in db.databases.values():
... a_db.close()
"""
from zope.testing import doctest
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment