File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -1837,26 +1837,16 @@ def test_handshake_08_invalid_aws_ec2(self):
18371837 )
18381838
18391839 def test_dict_hints (self ):
1840- c = rs_or_single_client ()
1841- try :
1842- c .t .t .find (hint = {"x" : 1 })
1843- except Exception :
1844- self .fail ("passing a dictionary hint to find failed!" )
1840+ self .db .t .find (hint = {"x" : 1 })
18451841
18461842 def test_dict_hints_sort (self ):
1847- c = rs_or_single_client ()
1848- try :
1849- result = c .t .t .find ()
1850- result .sort ({"x" : 1 })
1851- except Exception :
1852- self .fail ("passing a dictionary to sort failed!" )
1843+ result = self .db .t .find ()
1844+ result .sort ({"x" : 1 })
1845+
1846+ self .db .t .find (sort = {"x" : 1 })
18531847
18541848 def test_dict_hints_create_index (self ):
1855- c = rs_or_single_client ()
1856- try :
1857- c .t .t .create_index ({"x" : pymongo .ASCENDING })
1858- except Exception :
1859- self .fail ("passing a dictionary to create_index failed!" )
1849+ self .db .t .create_index ({"x" : pymongo .ASCENDING })
18601850
18611851
18621852class TestExhaustCursor (IntegrationTest ):
You can’t perform that action at this time.
0 commit comments