#NEWLINE# def test_cluster_with_one_still_running_step( self ) : #NEWLINE# #INDENT# cluster = MockEmrObject ( id = 'j-ISFORJUNGLE' , name = 'mr_exciting.woo.20100606.035855.000000' , normalizedinstancehours = '20' , status = MockEmrObject ( state = 'RUNNING' , timeline = MockEmrObject ( creationdatetime = '2010-06-06T04:00:00Z' , readydatetime = '2010-06-06T04:15:00Z' ) ) , steps = [ MockEmrObject ( name = 'mr_exciting.woo.20100606.035855.000000: Step 1 of 3' , status = MockEmrObject ( timeline = MockEmrObject ( startdatetime = '2010-06-06T04:15:00Z' ) ) ) ] ) #NEWLINE# summary = _cluster_to_full_summary ( cluster , now = datetime ( 2010 , 6 , 6 , 5 , 30 ) ) #NEWLINE# self . assertEqual ( summary , { #NEWLINE# #INDENT# 'created' : datetime ( 2010 , 6 , 6 , 4 , 0 ) , #NEWLINE# 'end' : None , #NEWLINE# 'id' : 'j-ISFORJUNGLE' , #NEWLINE# 'label' : 'mr_exciting' , #NEWLINE# 'name' : 'mr_exciting.woo.20100606.035855.000000' , #NEWLINE# 'nih' : 20.0 , #NEWLINE# 'nih_bbnu' : 0.0 , #NEWLINE# 'nih_billed' : 15.0 , #NEWLINE# 'nih_used' : 15.0 , #NEWLINE# 'num_steps' : 1 , #NEWLINE# 'owner' : 'woo' , #NEWLINE# 'pool' : None , #NEWLINE# 'ran' : timedelta ( hours = 1 , minutes = 30 ) , #NEWLINE# 'ready' : datetime ( 2010 , 6 , 6 , 4 , 15 ) , #NEWLINE# 'state' : 'RUNNING' , #NEWLINE# 'usage' : [ { #NEWLINE# #INDENT# 'date_to_nih_used' : { #NEWLINE# #INDENT# date ( 2010 , 6 , 6 ) : 2.5 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'date_to_nih_bbnu' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'date_to_nih_billed' : { #NEWLINE# #INDENT# date ( 2010 , 6 , 6 ) : 2.5 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'end' : datetime ( 2010 , 6 , 6 , 4 , 15 ) , #NEWLINE# 'end_billing' : datetime ( 2010 , 6 , 6 , 4 , 15 ) , #NEWLINE# 'hour_to_nih_used' : { #NEWLINE# #INDENT# datetime ( 2010 , 6 , 6 , 4 ) : 2.5 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'hour_to_nih_bbnu' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'hour_to_nih_billed' : { #NEWLINE# #INDENT# datetime ( 2010 , 6 , 6 , 4 ) : 2.5 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'label' : 'mr_exciting' , #NEWLINE# 'nih_used' : 2.5 , #NEWLINE# 'nih_bbnu' : 0.0 , #NEWLINE# 'nih_billed' : 2.5 , #NEWLINE# 'owner' : 'woo' , #NEWLINE# 'start' : datetime ( 2010 , 6 , 6 , 4 , 0 ) , #NEWLINE# 'step_num' : None , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'date_to_nih_used' : { #NEWLINE# #INDENT# date ( 2010 , 6 , 6 ) : 12.5 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'date_to_nih_bbnu' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'date_to_nih_billed' : { #NEWLINE# #INDENT# date ( 2010 , 6 , 6 ) : 12.5 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'end' : datetime ( 2010 , 6 , 6 , 5 , 30 ) , #NEWLINE# 'end_billing' : datetime ( 2010 , 6 , 6 , 5 , 30 ) , #NEWLINE# 'hour_to_nih_used' : { #NEWLINE# #INDENT# datetime ( 2010 , 6 , 6 , 4 ) : 7.5 , #NEWLINE# datetime ( 2010 , 6 , 6 , 5 ) : 5.0 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'hour_to_nih_bbnu' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'hour_to_nih_billed' : { #NEWLINE# #INDENT# datetime ( 2010 , 6 , 6 , 4 ) : 7.5 , #NEWLINE# datetime ( 2010 , 6 , 6 , 5 ) : 5.0 , #NEWLINE# #UNINDENT# } , #NEWLINE# 'label' : 'mr_exciting' , #NEWLINE# 'nih_used' : 12.5 , #NEWLINE# 'nih_bbnu' : 0.0 , #NEWLINE# 'nih_billed' : 12.5 , #NEWLINE# 'owner' : 'woo' , #NEWLINE# 'start' : datetime ( 2010 , 6 , 6 , 4 , 15 ) , #NEWLINE# 'step_num' : 1 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } )