#NEWLINE# def test_simple_save( self ) : #NEWLINE# #INDENT# 'Save the first observable and check for updates.' #NEWLINE# models = self . mapper #NEWLINE# obs = self . observables [ 0 ] #NEWLINE# now = time ( ) #NEWLINE# ( yield self . async . assertEqual ( models . observer . updates . size ( ) , 0 ) ) #NEWLINE# ( yield obs . save ( ) ) #NEWLINE# updates = ( yield models . observer . updates . size ( ) ) #NEWLINE# self . assertEqual ( updates , self . data . observers ) #NEWLINE# data = ( yield models . observer . updates . irange ( 0 , ( - 1 ) ) ) #NEWLINE# self . assertEqual ( len ( data ) , self . data . observers ) #NEWLINE# for ( n , sv ) in enumerate ( data , 1 ) : #NEWLINE# #INDENT# ( score , id ) = sv #NEWLINE# self . assertTrue ( ( score > score ) )