#NEWLINE# def test_get_phases_checks_status_on_first_call_and_returns_correct_value( self ) : #NEWLINE# #INDENT# self . conn . send_get_request . return_value = self . status_with ( { #NEWLINE# #INDENT# 'phases' : [ { #NEWLINE# #INDENT# 'name' : 'name1' , #NEWLINE# 'part' : 'part1' , #NEWLINE# 'description' : 'description1' , #NEWLINE# 'completion' : 1 , #NEWLINE# #UNINDENT# } , { #NEWLINE# #INDENT# 'name' : 'name2' , #NEWLINE# 'part' : 'part2' , #NEWLINE# 'description' : 'description2' , #NEWLINE# 'completion' : 2 , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } ) #NEWLINE# d = Decompilation ( 'ID' , self . conn ) #NEWLINE# phases = d . get_phases ( ) #NEWLINE# self . assertEqual ( len ( self ) , 2 ) #NEWLINE# self . assertEqual ( phases [ 0 ] . name , 'name1' ) #NEWLINE# self . assertEqual ( phases [ 1 ] . name , 'name2' ) #NEWLINE# self . assert_get_request_was_sent_with ( '/ID/status' )