#NEWLINE# @ patch . object ( hub . HubController , 'is_running' ) #NEWLINE# def test_status_not_running( self , mock_method ) : #NEWLINE# #INDENT# mock_method . return_value = False #NEWLINE# with self . assertRaises ( SystemExit ) as cm : #NEWLINE# #INDENT# shell . main ( [ 'status' ] ) #NEWLINE# #UNINDENT# self . assertEqual ( mock_method . exception . code , 1 )