Skip to content

Commit 6c68762

Browse files
committed
Use modern 'distinct' syntax in tests.
The old syntax is now an error: https://jira.mongodb.org/browse/SERVER-12642
1 parent 69f52d0 commit 6c68762

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_read_preferences.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,11 @@ def test_command(self):
309309

310310
# Distinct
311311
self._test_fn(True, lambda: self.c.pymongo_test.command(
312-
'distinct', 'test', key={'a': 1}))
312+
'distinct', 'test', key='a'))
313313
self._test_fn(True, lambda: self.c.pymongo_test.command(
314-
'distinct', 'test', key={'a': 1}, query={'a': 1}))
314+
'distinct', 'test', key='a', query={'a': 1}))
315315
self._test_fn(True, lambda: self.c.pymongo_test.command(SON([
316-
('distinct', 'test'), ('key', {'a': 1}), ('query', {'a': 1})])))
316+
('distinct', 'test'), ('key', 'a'), ('query', {'a': 1})])))
317317

318318
# Geo stuff. Make sure a 2d index is created and replicated
319319
self.c.pymongo_test.system.indexes.insert({

0 commit comments

Comments
 (0)