#NEWLINE# def test_bulk_insert_intervals_before( self ) : #NEWLINE# #INDENT# ( a , b , c , d , e , f ) = ( 10 , 11 , 12 , 13 , 14 , 15 ) #NEWLINE# inserts = OrderedDict ( ( ( None , { #NEWLINE# #INDENT# 'test1' : [ 1 , 2 , 3 ] , #NEWLINE# 'test2' : [ 4 , 5 , 6 ] , #NEWLINE# #UNINDENT# } ) , ( _time ( 0 ) , { #NEWLINE# #INDENT# 'test1' : [ 1 , 2 , 3 ] , #NEWLINE# 'test2' : [ 4 , 5 , 6 ] , #NEWLINE# 'test3' : [ 7 , 8 , 9 ] , #NEWLINE# #UNINDENT# } ) , ( _time ( 30 ) , { #NEWLINE# #INDENT# 'test1' : [ 1 , 2 , 3 ] , #NEWLINE# 'test2' : [ 4 , 5 , 6 ] , #NEWLINE# #UNINDENT# } ) , ( _time ( 60 ) , { #NEWLINE# #INDENT# 'test1' : [ t1_i2 , b , c ] , #NEWLINE# 'test3' : [ d , e , f ] , #NEWLINE# #UNINDENT# } ) ) ) #NEWLINE# self . series . bulk_insert ( inserts , intervals = ( - 3 ) ) #NEWLINE# t1_i1 = self . series . get ( 'test1' , 'minute' , timestamp = _time ( 0 ) ) #NEWLINE# assert_equals ( ( ( ( ( ( ( ( ( 1 + 2 ) + 3 ) + 1 ) + 2 ) + 3 ) + a ) + b ) + c ) , t1_i1 [ _time ( 0 ) ] ) #NEWLINE# t2_i1 = self . series . get ( 'test2' , 'minute' , timestamp = _time ( 0 ) ) #NEWLINE# assert_equals ( ( ( ( ( ( 4 + 5 ) + 6 ) + 4 ) + 5 ) + 6 ) , t2_i1 [ _time ( 0 ) ] ) #NEWLINE# t3_i1 = self . series . get ( 'test3' , 'minute' , timestamp = _time ( 0 ) ) #NEWLINE# assert_equals ( ( ( ( ( ( 7 + 8 ) + 9 ) + d ) + e ) + f ) , t3_i1 [ _time ( 0 ) ] ) #NEWLINE# t1_i2 = self . series . get ( 'test1' , 'minute' , timestamp = _time ( ( - 60 ) ) ) #NEWLINE# assert_equals ( ( ( ( ( ( ( ( ( 1 + 2 ) + 3 ) + 1 ) + 2 ) + 3 ) + a ) + b ) + c ) , t1_i2 [ _time ( ( - 60 ) ) ] ) #NEWLINE# t3_i3 = self . series . get ( 'test3' , 'minute' , timestamp = _time ( ( - 120 ) ) ) #NEWLINE# assert_equals ( ( ( ( ( ( 7 + 8 ) + 9 ) + d ) + e ) + f ) , t3_i3 [ _time ( ( - 120 ) ) ] ) #NEWLINE# t3_i4 = self . series . get ( 'test3' , 'minute' , timestamp = _time ( ( - 180 ) ) ) #NEWLINE# assert_equals ( ( ( 7 + 8 ) + 9 ) , t3_i4 [ _time ( ( - 180 ) ) ] )