Improve connect/disconnect

- document disconnect + sample of usage
- add more test cases to prevent github issues regressions
This commit is contained in:
Bastien Gérard
2019-04-24 22:44:07 +02:00
parent d1467c2f73
commit b1e28d02f7
5 changed files with 95 additions and 22 deletions

View File

@@ -318,6 +318,9 @@ def connect(db=None, alias=DEFAULT_CONNECTION_NAME, **kwargs):
Multiple databases are supported by using aliases. Provide a separate
`alias` to connect to a different instance of :program:`mongod`.
In order to replace a connection identified by a given alias, you'll
need to call ``disconnect`` first
See the docstring for `register_connection` for more details about all
supported kwargs.