#NEWLINE# def test_is_draining_yes( self ) : #NEWLINE# #INDENT# fake_response = mock . Mock ( status_code = 503 , text = 'Service service in down state since 1435694078.778886 until 1435694178.780000: Drained by Paasta' ) #NEWLINE# fake_task = mock . Mock ( host = 'fake_host' , ports = [ 54321 ] ) #NEWLINE# with mock . patch ( 'requests.get' , return_value = fake_response ) : #NEWLINE# #INDENT# assert ( self . drain_method . is_draining ( self ) is True )