#NEWLINE# def serializerTest( format , self ) : #NEWLINE# #INDENT# management . flush ( verbosity = 0 , interactive = False ) #NEWLINE# objects = [ ] #NEWLINE# transaction . enter_transaction_management ( ) #NEWLINE# transaction . managed ( True ) #NEWLINE# for ( func , pk , klass , datum ) in test_data : #NEWLINE# #INDENT# objects . append ( func [ 0 ] ( pk , klass , datum ) ) #NEWLINE# #UNINDENT# transaction . commit ( ) #NEWLINE# transaction . leave_transaction_management ( ) #NEWLINE# objects . extend ( Tag . objects . all ( ) ) #NEWLINE# serialized_data = serializers . serialize ( format , objects , indent = 2 ) #NEWLINE# management . flush ( verbosity = 0 , interactive = False ) #NEWLINE# transaction . enter_transaction_management ( ) #NEWLINE# transaction . managed ( True ) #NEWLINE# for obj in serializers . deserialize ( format , serialized_data ) : #NEWLINE# #INDENT# obj . save ( ) #NEWLINE# #UNINDENT# transaction . commit ( ) #NEWLINE# transaction . leave_transaction_management ( ) #NEWLINE# for ( func , pk , klass , datum ) in test_data : #NEWLINE# #INDENT# func [ 1 ] ( self , pk , klass , datum )