Commit Graph

1259 Commits

Author SHA1 Message Date
Bernie Hackett
93bef6eb23 PYTHON-915 - More robust latency test. 2015-05-07 15:53:34 -07:00
Bernie Hackett
90efec37ff PYTHON-915 - Allow 0 for secondaryAcceptableLatencyMS. 2015-05-06 18:13:12 -07:00
Bernie Hackett
9bf46d2bb1 PYTHON-920, PYTHON-921 - Fix metadata helpers with direct connection.
With this change metadata helpers (database_names, collection_names,
options, and index_information) no longer require a non-primary read
preference or the slave_okay option to run them against a directly
connected secondary or slave. This was the easiest way to make the
driver behave consistently across MongoDB versions and helpers. This
is also consistent with the server selection spec, though we are not
implementing that spec for PyMongo 2.x.
2015-05-06 09:14:55 -07:00
behackett
5d8194d0f3 PYTHON-913 - Fix test for old python versions. 2015-04-28 17:26:13 -04:00
behackett
b172a1f1a9 PYTHON-913 - Suppress read preference warning under MongoClient. 2015-04-28 15:45:17 -04:00
A. Jesse Jiryu Davis
8e9bd739b0 Longer wait queue timeout in test_auth_network_error. 2015-04-24 22:25:51 -04:00
A. Jesse Jiryu Davis
8c5e547274 PYTHON-903 - Don't *require* a network error in auth test. 2015-04-23 22:08:23 -04:00
A. Jesse Jiryu Davis
f05e800820 Fix test_auth_network_error for replsets.
We added a user then tried to admin with a disconnected client. During
reconnect it may try to log in with a secondary, which hasn't always
replicated the credentials yet. This change uses the global test creds
instead of creating new ones, so replication doesn't confound the test.
2015-04-23 15:24:23 -04:00
A. Jesse Jiryu Davis
22cf7f2918 PYTHON-894 - Can't use addCleanup in PyMongo 2 tests. 2015-04-17 18:54:52 -04:00
A. Jesse Jiryu Davis
2ef99ef692 PYTHON-894 - Can't use addCleanup in PyMongo 2 tests. 2015-04-17 17:36:01 -04:00
A. Jesse Jiryu Davis
f18b3644c2 PYTHON-894 - Set cursor.alive False after final batch.
Even with this change, "next" can raise StopIteration even though
"alive" is True. For example if batch size is 2 and there are 4
documents in the result set, then after the 4th document "alive" is True
but "next" raises StopIteration.
2015-04-17 16:19:03 -04:00
Bernie Hackett
773a8dff0b PYTHON-842 - Fix tests for python with no ssl module. 2015-04-14 11:17:32 -07:00
Bernie Hackett
eaaa54b903 PYTHON-893 - Fix application of SON manipulators in CommandCursor. 2015-04-14 11:07:51 -07:00
Bernie Hackett
eda1e771f6 PYTHON-842 - SSL URI config support.
This commit cleans up and builds on the work in commit
cc943f176c.
2015-04-14 10:59:00 -07:00
Len Buckens
cc943f176c allow ssl_cert_reqs options to be passed as string 2015-04-13 12:27:05 -07:00
Bernie Hackett
2598869d26 PYTHON-864 - Support RFC-3339 offset format for $date. 2015-04-13 12:09:58 -07:00
Bernie Hackett
0687e9b656 PYTHON-832 - Disable copy_database auth tests with MongoDB 2.7.2+ 2015-01-28 11:48:42 -08:00
Bernie Hackett
84c34a3d45 Remove redundant test_copy_db_scram_sha_1. 2015-01-28 11:48:27 -08:00
Bernie Hackett
82af07b9c8 Remove "text" command read preference test. 2015-01-20 10:08:15 -08:00
Bernie Hackett
83f53499ae Fix auth DeprecationWarning test. 2014-12-23 15:37:47 -08:00
A. Jesse Jiryu Davis
9e6a267854 PYTHON-786: Silence DeprecationWarnings in test_master_slave_connection. 2014-12-21 17:11:07 -06:00
A. Jesse Jiryu Davis
61f526a2c5 PYTHON-783 Silence copy_database DeprecationWarnings in tests. 2014-12-21 17:11:07 -06:00
A. Jesse Jiryu Davis
31b83bc0e0 PYTHON-807 Silence DeprecationWarnings in getlasterror tests. 2014-12-21 17:11:07 -06:00
A. Jesse Jiryu Davis
be1a7be639 PYTHON-799 Python 2.4 compatibility in test_kill_cursors_warning. 2014-12-17 15:17:59 -05:00
A. Jesse Jiryu Davis
d195c7c70d PYTHON-799 Warn when MongoClient can't close a cursor. 2014-12-17 14:12:36 -05:00
Heewa Barfchin
5c4556b013 Add generator versions of decode_all in bson.
When decoding large collections of bson documents, the python representation
of dicts are time and space costly, so it's sometimes useful to generate and
consume the documents iteratively. This patch adds two new functions to do
that: decode_iter and decode_file_iter. The first is given all the bson data,
but yields one document at a time, while the second reads from a file object
enough to yield one document at a time (to avoid reading in an entire file).
2014-11-21 15:22:24 -08:00
Bernie Hackett
80bcdb3156 PYTHON-791 - Fix JSON support for Timestamp. 2014-11-21 09:26:37 -08:00
A. Jesse Jiryu Davis
cd3d37b43a Skip copydb auth test with mongos. 2014-11-10 19:42:41 -05:00
A. Jesse Jiryu Davis
4579303838 More thorough test_last_error_options. 2014-11-10 18:33:22 -05:00
A. Jesse Jiryu Davis
e1826051f4 Fix TestBulkWriteConcern for MongoDB 2.8. 2014-11-10 18:33:22 -05:00
A. Jesse Jiryu Davis
fd22f89f9e Fix test_last_error_options for MongoDB 2.8. 2014-11-10 18:33:22 -05:00
A. Jesse Jiryu Davis
52f2314947 More reliable TestClientAuth.test_copy_db. 2014-11-07 23:09:42 -05:00
A. Jesse Jiryu Davis
0b7b51975e PYTHON-777 Make copy_database work with SCRAM-SHA-1.
See doc/examples/copydb.rst for details.
2014-11-07 17:13:40 -05:00
A. Jesse Jiryu Davis
bd895ca079 PYTHON-782 Demonstrate error from readchunk() of disconnected GridOut. 2014-11-06 22:18:04 -05:00
Bernie Hackett
6a39f811b2 Manipulate defaults to False in find_and_modify. 2014-11-02 08:06:33 -08:00
Sergey Azovskov
5ccd02653a Added support for manipulate param in find_and_modify for consistency with find method 2014-11-02 08:02:11 -08:00
Bernie Hackett
b5f94974c4 Fix MasterSlaveConnection insert test. 2014-10-29 14:11:35 -07:00
Bernie Hackett
d3e88ee8ed PYTHON-768 - Support authMechanismProperties.
This change also deprecates the gssapiServiceName option, which
is replaced by authMechanismProperties=SERVICE_NAME:<service name>.
2014-10-29 13:37:05 -07:00
A. Jesse Jiryu Davis
c101ed036c Test insert with MasterSlaveConnection. 2014-10-29 11:53:00 -04:00
A. Jesse Jiryu Davis
7c5d8b6fc1 Delete two unreliable master-slave tests.
These tests were guaranteed to fail occasionally, but they didn't test
a driver feature anyway.
2014-10-29 11:53:00 -04:00
Bernie Hackett
37c5c6b99a PYTHON-781 - Fix tests for multiple storage engines.
Remove a few seemingly pointless test cases that
aren't portable across server versions, storage engines,
etc.
2014-10-28 15:30:25 -07:00
A. Jesse Jiryu Davis
10ba3b46a7 Test GridFS.find_one. 2014-10-28 15:53:36 -04:00
A. Jesse Jiryu Davis
a657a263b5 PYTHON-703 Fix tests for Python 2.4. 2014-10-24 13:09:46 -04:00
Don Mitchell
26f3f40fc9 Allow destructive ops during son iteration
and let python handle (identical to iter on list)
2014-10-24 13:07:55 -04:00
Don Mitchell
01b499850c Don't unnecessarily copy the key list
Conflicts:
	doc/contributors.rst
	test/test_son.py
2014-10-24 13:07:55 -04:00
behackett
45d058f123 PYTHON-644 - Send w=1 to the server if explicitly provided. 2014-10-23 17:08:45 -04:00
A. Jesse Jiryu Davis
e3d6510761 PYTHON-764 SCRAM-SHA-1 automatic upgrade / downgrade. 2014-10-23 08:28:09 -04:00
A. Jesse Jiryu Davis
bf091b8d22 Increase WTimeout in test_gridfs_replica_set. 2014-10-20 09:06:55 -04:00
A. Jesse Jiryu Davis
0e5780751a PYTHON-736 Delete racy test_exhaust_getmore_server_error. 2014-10-17 17:11:09 -04:00
A. Jesse Jiryu Davis
2c6ecb490a PYTHON-766 Python 2.4-compatible test for parsing mongos errors. 2014-10-09 11:30:47 -04:00