Use modern 'distinct' syntax in tests.

The old syntax is now an error:
https://jira.mongodb.org/browse/SERVER-12642
This commit is contained in:
A. Jesse Jiryu Davis 2014-06-18 20:34:45 -04:00
parent 69f52d0cdf
commit 6c68762960

View File

@ -309,11 +309,11 @@ class TestCommandAndReadPreference(TestReplicaSetClientBase):
# Distinct
self._test_fn(True, lambda: self.c.pymongo_test.command(
'distinct', 'test', key={'a': 1}))
'distinct', 'test', key='a'))
self._test_fn(True, lambda: self.c.pymongo_test.command(
'distinct', 'test', key={'a': 1}, query={'a': 1}))
'distinct', 'test', key='a', query={'a': 1}))
self._test_fn(True, lambda: self.c.pymongo_test.command(SON([
('distinct', 'test'), ('key', {'a': 1}), ('query', {'a': 1})])))
('distinct', 'test'), ('key', 'a'), ('query', {'a': 1})])))
# Geo stuff. Make sure a 2d index is created and replicated
self.c.pymongo_test.system.indexes.insert({