#NEWLINE# def test__save_class_deriving_from_dict( self ) : #NEWLINE# #INDENT# class Document ( dict ) : #NEWLINE# #INDENT# def __init__( self , collection ) : #NEWLINE# #INDENT# self . collection = collection #NEWLINE# super ( Document , self ) . __init__ ( ) #NEWLINE# self . save ( ) #NEWLINE# #UNINDENT# def save( self ) : #NEWLINE# #INDENT# self . collection . save ( self ) #NEWLINE# #UNINDENT# #UNINDENT# doc = Document ( doc . db . collection ) #NEWLINE# self . assertIn ( '_id' , doc ) #NEWLINE# self . assertNotIn ( 'collection' , doc )