#NEWLINE# def test_cluster_with_no_steps_split_over_midnight( self ) : #NEWLINE# #INDENT# cluster = MockEmrObject ( id = 'j-ISFORJOY' , name = 'mr_exciting.woo.20100605.232950.000000' , normalizedinstancehours = '20' , status = MockEmrObject ( state = 'TERMINATED' , timeline = MockEmrObject ( creationdatetime = '2010-06-05T23:30:00Z' , enddatetime = '2010-06-06T01:15:00Z' , readydatetime = '2010-06-05T23:45:00Z' ) ) ) #NEWLINE# summary = _cluster_to_full_summary ( cluster ) #NEWLINE# self . assertEqual ( summary , { #NEWLINE# #INDENT# 'created' : datetime ( 2010 , 6 , 5 , 23 , 30 ) , #NEWLINE# 'end' : datetime ( 2010 , 6 , 6 , 1 , 15 ) , #NEWLINE# 'id' : 'j-ISFORJOY' , #NEWLINE# 'label' : 'mr_exciting' , #NEWLINE# 'name' : 'mr_exciting.woo.20100605.232950.000000' , #NEWLINE# 'nih' : 20.0 , #NEWLINE# 'nih_bbnu' : 17.5 , #NEWLINE# 'nih_billed' : 20.0 , #NEWLINE# 'nih_used' : 2.5 , #NEWLINE# 'num_steps' : 0 , #NEWLINE# 'owner' : 'woo' , #NEWLINE# 'pool' : None , #NEWLINE# 'ran' : timedelta ( hours = 1 , minutes = 45 ) , #NEWLINE# 'ready' : datetime ( 2010 , 6 , 5 , 23 , 45 ) , #NEWLINE# 'state' : 'TERMINATED' , #NEWLINE# 'usage' : [ { #NEWLINE# #INDENT# 'date_to_nih_bbnu' : { #NEWLINE# #INDENT# date ( 2010 , 6 , 5 ) : 2.5 , #NEWLINE# date ( 2010 , 6 , 6 ) : 15.0 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'date_to_nih_billed' : { #NEWLINE# #INDENT# date ( 2010 , 6 , 5 ) : 5.0 , #NEWLINE# date ( 2010 , 6 , 6 ) : 15.0 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'date_to_nih_used' : { #NEWLINE# #INDENT# date ( 2010 , 6 , 5 ) : 2.5 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'end' : datetime ( 2010 , 6 , 5 , 23 , 45 ) , #NEWLINE# 'end_billing' : datetime ( 2010 , 6 , 6 , 1 , 30 ) , #NEWLINE# 'hour_to_nih_bbnu' : { #NEWLINE# #INDENT# datetime ( 2010 , 6 , 5 , 23 ) : 2.5 , #NEWLINE# datetime ( 2010 , 6 , 6 , 0 ) : 10.0 , #NEWLINE# datetime ( 2010 , 6 , 6 , 1 ) : 5.0 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'hour_to_nih_billed' : { #NEWLINE# #INDENT# datetime ( 2010 , 6 , 5 , 23 ) : 5.0 , #NEWLINE# datetime ( 2010 , 6 , 6 , 0 ) : 10.0 , #NEWLINE# datetime ( 2010 , 6 , 6 , 1 ) : 5.0 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'hour_to_nih_used' : { #NEWLINE# #INDENT# datetime ( 2010 , 6 , 5 , 23 ) : 2.5 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'label' : 'mr_exciting' , #NEWLINE# 'nih_bbnu' : 17.5 , #NEWLINE# 'nih_billed' : 20.0 , #NEWLINE# 'nih_used' : 2.5 , #NEWLINE# 'owner' : 'woo' , #NEWLINE# 'start' : datetime ( 2010 , 6 , 5 , 23 , 30 ) , #NEWLINE# 'step_num' : None , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } )