-
Type: New Feature
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
PYTHON-1685 renovated the MongoClient.get_default_database method. We should add this method to Motor. We should add this method and fix the failing synchro tests:
====================================================================== ERROR: test_get_default_database (test.test_client.ClientUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/motor/.tox/synchro/tmp/mongo-python-driver/test/test_client.py", line 189, in test_get_default_database self.assertEqual(Database(c, 'foo'), c.get_default_database()) TypeError: 'Database' object is not callable ====================================================================== ERROR: test_get_default_database_error (test.test_client.ClientUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/motor/.tox/synchro/tmp/mongo-python-driver/test/test_client.py", line 212, in test_get_default_database_error self.assertRaises(ConfigurationError, c.get_default_database) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 475, in assertRaises callableObj(*args, **kwargs) TypeError: 'Database' object is not callable ====================================================================== ERROR: test_get_default_database_with_authsource (test.test_client.ClientUnitTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/shane/git/motor/.tox/synchro/tmp/mongo-python-driver/test/test_client.py", line 219, in test_get_default_database_with_authsource self.assertEqual(Database(c, 'foo'), c.get_default_database()) TypeError: 'Database' object is not callable
- related to
-
PYTHON-1685 Interface to connect to database from uri with default database name
- Closed