#NEWLINE# def test_document_class( self ) : #NEWLINE# #INDENT# c = self . client #NEWLINE# db = c . pymongo_test #NEWLINE# db . test . insert_one ( { #NEWLINE# #INDENT# 'x' : 1 , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertEqual ( dict , c . codec_options . document_class ) #NEWLINE# self . assertTrue ( isinstance ( db . test . find_one ( ) , dict ) ) #NEWLINE# self . assertFalse ( isinstance ( db . test . find_one ( ) , SON ) ) #NEWLINE# c = rs_or_single_client ( document_class = SON ) #NEWLINE# db = c . pymongo_test #NEWLINE# self . assertEqual ( SON , c . codec_options . document_class ) #NEWLINE# self . assertTrue ( isinstance ( db . test . find_one ( ) , SON ) )