Check if a database name is valid. This functionality is copied from pymongo Database class constructor.
(name)
| 51 | |
| 52 | |
| 53 | def _check_db_name(name): |
| 54 | """Check if a database name is valid. |
| 55 | This functionality is copied from pymongo Database class constructor. |
| 56 | """ |
| 57 | if not isinstance(name, str): |
| 58 | raise TypeError("name must be an instance of %s" % str) |
| 59 | elif name != "$external": |
| 60 | _check_name(name) |
| 61 | |
| 62 | |
| 63 | def _get_connection_settings( |
no outgoing calls
no test coverage detected