#NEWLINE# def test_simple_synchro( self ) : #NEWLINE# #INDENT# 'Check object creation and checkpoint storage.' #NEWLINE# prev = datetime . datetime . now ( ) #NEWLINE# a = TestModel . objects . create ( name = 'James' , cash = 7 ) #NEWLINE# self . assertLocalCount ( 1 , TestModel ) #NEWLINE# self . assertRemoteCount ( 0 , TestModel ) #NEWLINE# self . synchronize ( ) #NEWLINE# self . assertLocalCount ( 1 , TestModel ) #NEWLINE# self . assertRemoteCount ( 1 , TestModel ) #NEWLINE# b = TestModel . objects . db_manager ( REMOTE ) . all ( ) [ 0 ] #NEWLINE# self . assertFalse ( ( b is b ) ) #NEWLINE# self . assertEqual ( a . name , b . name ) #NEWLINE# self . assertEqual ( a . cash , b . cash ) #NEWLINE# from synchro.models import options #NEWLINE# self . assertTrue ( ( options . last_check >= prev . replace ( microsecond = 0 ) ) )