#NEWLINE# def test_find_one( self ) : #NEWLINE# #INDENT# self . client . pymongo_test . test . find_one ( ) #NEWLINE# results = self . listener . results #NEWLINE# started = results [ 'started' ] [ 0 ] #NEWLINE# succeeded = results [ 'succeeded' ] [ 0 ] #NEWLINE# self . assertEqual ( 0 , len ( results [ 'failed' ] ) ) #NEWLINE# self . assertTrue ( isinstance ( succeeded , monitoring . CommandSucceededEvent ) ) #NEWLINE# self . assertTrue ( isinstance ( started , monitoring . CommandStartedEvent ) ) #NEWLINE# self . assertEqual ( SON ( [ ( 'find' , 'test' ) , ( 'filter' , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) , ( 'limit' , 1 ) , ( 'singleBatch' , True ) ] ) , started . command ) #NEWLINE# self . assertEqual ( 'find' , started . command_name ) #NEWLINE# self . assertEqual ( self . client . address , started . connection_id ) #NEWLINE# self . assertEqual ( 'pymongo_test' , started . database_name ) #NEWLINE# self . assertTrue ( isinstance ( started . request_id , int ) )