#NEWLINE# def test_post_replicate_hook( self ) : #NEWLINE# #INDENT# ts = ( Timestamp ( t ) . internal for t in itertools . count ( int ( time . time ( ) ) ) ) #NEWLINE# broker = self . _get_broker ( 'a' , 'c' , node_index = 0 ) #NEWLINE# broker . initialize ( next ( ts ) , 0 ) #NEWLINE# broker . put_object ( 'foo' , next ( ts ) , 0 , 'text/plain' , 'xyz' , deleted = 0 , storage_policy_index = 0 ) #NEWLINE# info = broker . get_replication_info ( ) #NEWLINE# self . assertEqual ( 1 , info [ 'max_row' ] ) #NEWLINE# self . assertEqual ( ( - 1 ) , broker . get_reconciler_sync ( ) ) #NEWLINE# daemon = replicator . ContainerReplicator ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# calls = [ ] #NEWLINE# with self . _wrap_update_reconciler_sync ( broker , calls ) : #NEWLINE# #INDENT# daemon . _post_replicate_hook ( broker , info , [ ] ) #NEWLINE# #UNINDENT# self . assertEqual ( 1 , len ( calls ) ) #NEWLINE# calls = [ ] #NEWLINE# with self . _wrap_update_reconciler_sync ( broker , calls ) : #NEWLINE# #INDENT# daemon . _post_replicate_hook ( broker , calls , [ ] ) #NEWLINE# #UNINDENT# self . assertEqual ( 0 , len ( calls ) )