#NEWLINE# def test_get_container_logs_bad_return_code( self ) : #NEWLINE# #INDENT# mock_conn = self . mox . CreateMockAnything ( ) #NEWLINE# url = '/v1.4/containers/XXX/attach?logs=1&stream=0&stdout=1&stderr=1' #NEWLINE# mock_conn . request ( 'POST' , url , headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json' , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = FakeResponse ( 404 ) #NEWLINE# mock_conn . getresponse ( ) . AndReturn ( response ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# client = nova . virt . docker . client . DockerHTTPClient ( mock_conn ) #NEWLINE# logs = client . get_container_logs ( 'XXX' ) #NEWLINE# self . assertEqual ( None , logs ) #NEWLINE# self . mox . VerifyAll ( )