Commit Graph

130 Commits

Author SHA1 Message Date
A. Jesse Jiryu Davis
2c6ecb490a PYTHON-766 Python 2.4-compatible test for parsing mongos errors. 2014-10-09 11:30:47 -04:00
A. Jesse Jiryu Davis
90098d3844 PYTHON-766 Demonstrate a bug parsing an error message from mongos. 2014-10-07 19:38:34 -04:00
Bernie Hackett
f8e6d36c8a PYTHON-493 - Add **kwargs to Database.dereference 2014-09-26 16:18:47 -07:00
Bernie Hackett
0fb2fcfac0 PYTHON-700 - Support subclassing of son manipulators 2014-09-24 09:50:31 -07:00
Luke Lovett
7decdd8a40 PYTHON-751 Move all auth tests to the test_auth module. 2014-08-29 22:51:39 +00:00
A. Jesse Jiryu Davis
e904f014d9 PYTHON-709 insert _id in document after applying non-copying SONManipulators. 2014-06-19 14:50:41 -04:00
Bernie Hackett
6991b73734 Fix a few tests for MongoDB 2.7.0 2014-05-12 14:07:25 -07:00
Bernie Hackett
04ff22e3c9 Various fixes for auth tests with old mongos versions. 2014-05-02 15:15:08 -07:00
Bernie Hackett
13cd9bee6f Fix a few tests with really old mongos versions. 2014-05-01 19:20:33 -07:00
Bernie Hackett
9d47f1cd3d PYTHON-691 - Fix UserWarning command issues.
Don't raise UserWarning for helpers and internal calls to
commands that do not obey read preference.
2014-05-01 09:21:52 -07:00
Bernie Hackett
22caa27a72 Add more tests for maxTimeMS PYTHON-550 2014-03-04 10:35:45 -08:00
Bernie Hackett
502b7d4c0c Fix tox compatibility.
The tox testing tool has dropped support for python 2.5
(and therefore jython) and by default sets PYTHONHASHSEED
to a random value. pip is dropping python 3.1 in its next
release so we might as well drop that from tox.ini now as
well.
2014-02-25 12:35:37 -08:00
A. Jesse Jiryu Davis
1361579c82 add_user(name, read_only=True) should update existing user in MongoDB 2.6, PYTHON-643. 2014-02-24 13:53:13 -05:00
A. Jesse Jiryu Davis
2fa1750b07 Update copyright notices and company name. 2014-01-31 09:36:46 -05:00
Bernie Hackett
1a8071cc6b Use w=0 in gle test - work around SERVER-12474
GLE behavior is undefined after a write command
so use the legacy wire protocol messages in this
test.
2014-01-30 08:43:42 -08:00
A. Jesse Jiryu Davis
8f6a34326e Improve multithreaded connection and reconnection in MongoClient, PYTHON-487. 2013-12-04 21:09:15 -05:00
Bernie Hackett
3ddb001129 Fix profiler test for mongo 2.5.x nightly 2013-11-15 16:25:11 -08:00
Bernie Hackett
0cb632784a Skip auth tests if auth not enabled PYTHON-556
This change does a few things:

1. In anticipation of the server defaulting to a "disabled" mode for
auth, only run authentication related tests if auth is enabled.
2. Attempt to clean up users in a finally block, even if tests failed.
3. Look for auth settings in "parsed" from getCmdLineOpts in case the
cluster was started with config files.
4. Remove useless remove_all_users calls at the beginning of tests - if
users were added in a previous test and we forgot to clean them up
these are going to fail no matter what when auth is enabled.
2013-11-05 09:10:00 -08:00
Amalia Hawkins
1ee488cc6d PYTHON-577: Warn when a command is redirected to the primary and read preference is not primary 2013-10-31 15:08:37 -07:00
Bernie Hackett
add8d4fd6a More warnings cleanup. 2013-10-31 12:04:21 -07:00
Bernie Hackett
b5bcbcd5d2 Always digest passwords client side PYTHON-552 2013-10-30 14:31:03 -07:00
A. Jesse Jiryu Davis
25343af3b4 Skip regex tests on older MongoDB versions 2013-10-20 21:28:45 -04:00
A. Jesse Jiryu Davis
e4cf504559 Option to not compile BSON regexes. PYTHON-500
Add a 'compile_re' parameter to Collection.find, Collection.find_one, and
json_util.loads. If it's False, regular expressions are encoded as a new class,
Regex, instead of passed to re.compile(). This allows PyMongo to handle regular
expressions that don't compile in Python but are valid in other contexts like
MongoDB queries.
2013-10-20 17:18:32 -04:00
Bernie Hackett
5eccdc42d9 Final changes for PYTHON-552
- Use default roles when no roles are provided (MongoDB 2.5.3+).
- DeprecationWarning when using read_only or not passing roles (MongoDB 2.5.3+).
- Check for error code 59 in remove_user.
- Roles and read_only are not compatible.
- TypeError -> ValueError for '' as password.
- Better validation all around.
2013-10-17 14:05:48 -07:00
A. Jesse Jiryu Davis
9a7b748cd5 Don't add _id to update documents when manipulate=True. PYTHON-585 2013-10-17 16:36:49 -04:00
Bernie Hackett
43e4ca91de Fix tests to support the latest MongoDB nightly. 2013-10-15 15:25:10 -07:00
A. Jesse Jiryu Davis
336fb94853 Test _check_command_response when response has no "ok" field. PYTHON-574 2013-10-10 15:01:54 -04:00
behackett
6c01a5a61a Fix replica set auth tests and update some SkipTest messages. 2013-09-24 17:49:14 -07:00
hawka
a02e37ba5e PYTHON-552: Manipulate user objects exclusively via commands for 2.6 2013-09-24 17:30:33 -07:00
A. Jesse Jiryu Davis
f1f7b14bf6 Allow MongoClients to be GC'ed after test runs.
Work around http://bugs.python.org/issue11798 to reduce max connection count during tests.
2013-08-27 09:00:50 -04:00
Bernie Hackett
9d9ac1c1da Fix various tests for mongos and old mongo versions. 2013-08-16 18:58:04 -07:00
Park Hyunwoo
baf53bee2d Add optional parameter for pymongo.database.collection_names to ignore system collections 2013-08-16 09:47:21 -07:00
A. Jesse Jiryu Davis
0041d6bfe9 Clarify network_timeout and commands PYTHON-495 2013-06-03 23:47:18 -04:00
Bernie Hackett
1ed7718ad1 Don't mask authentication failure details.
These changes should make it easier to debug
kerberos configuration issues on the client
and server.
2013-03-22 07:56:15 -07:00
behackett
6a5a8b95ac Support MongoDB 2.4 options in add_user. 2013-03-21 15:51:47 -07:00
A. Jesse Jiryu Davis
c758efcb34 Rename test_connection -> test_client, test_replica_set_connection -> test_replica_set_client PYTHON-451 2013-02-11 21:33:55 -05:00
A. Jesse Jiryu Davis
d35bec12e5 Tests use MongoClient instead of Connection PYTHON-451 2013-02-11 20:57:17 -05:00
A. Jesse Jiryu Davis
890fc929b0 Unused import 2013-02-09 09:57:28 -05:00
behackett
41254542d9 Auth refactor to prepare for PYTHON-465.
This also addresses PYTHON-464 and makes
logout sane.
2013-01-31 18:05:51 -08:00
behackett
118ab45001 Tests should clean up after themselves. 2013-01-23 13:10:54 -08:00
behackett
e52bf75bbf Allow RO admin and RW non-admin users concurrently PYTHON-458 2013-01-22 17:12:16 -08:00
behackett
2b0c5e73ce Fix $cmd queries with $readPreference PYTHON-446 2012-12-01 20:21:05 -08:00
Ross Lawley
29b9de45db Added __ne__ for DBRefs PYTHON-440 2012-11-22 11:12:36 +00:00
Bernie Hackett
e0c373038e Work around V8 issues in tests.
See SERVER-7705 for details.
2012-11-19 06:51:23 -08:00
Bernie Hackett
5319bcc83a Skip tests that tickle a V8 bug in mongo nightly. 2012-11-16 16:53:46 -08:00
Ross Lawley
4a3279c10a Add slow_ms as an option to set_profiling_level PYTHON-405 2012-10-25 13:36:50 +00:00
Ross Lawley
8637cfbe27 Adding first user from localhost works but raises OperationFailure - PYTHON-407 2012-10-05 15:04:56 +00:00
behackett
59439e02b8 Fix testing against mongos. PYTHON-373. 2012-07-13 10:38:04 -07:00
behackett
a33b0fce4d Fix safe with auth for MongoDB >= 2.1.x PYTHON-371
The getLastError command requires authentication in
MongoDB 2.2. See the associated ticket for more
information.
2012-07-12 10:49:13 -07:00
behackett
0ee7170cc2 It's 2012... 2012-04-19 12:40:38 -07:00