#NEWLINE# def test_replicator_sync( self ) : #NEWLINE# #INDENT# rpc = db_replicator . ReplicatorRpc ( '/' , '/' , FakeBroker , False ) #NEWLINE# broker = FakeBroker ( ) #NEWLINE# response = rpc . sync ( broker , ( ( broker . get_sync ( ) + 1 ) , 12345 , 'id_' , 'created_at' , 'put_timestamp' , 'delete_timestamp' , '{"meta1": "data1", "meta2": "data2"}' ) ) #NEWLINE# self . assertEqual ( { #NEWLINE# #INDENT# 'meta1' : 'data1' , #NEWLINE# 'meta2' : 'data2' , #NEWLINE# #UNINDENT# } , broker . metadata ) #NEWLINE# self . assertEqual ( 'created_at' , broker . created_at ) #NEWLINE# self . assertEqual ( 'put_timestamp' , broker . put_timestamp ) #NEWLINE# self . assertEqual ( 'delete_timestamp' , broker . delete_timestamp ) #NEWLINE# self . assertEqual ( '200 OK' , response . status ) #NEWLINE# self . assertEqual ( 200 , response . status_int )