#NEWLINE# def test_pull_repository_tag( self ) : #NEWLINE# #INDENT# mock_conn = self . mox . CreateMockAnything ( ) #NEWLINE# url = '/v1.4/images/create?fromImage=ping&tag=pong' #NEWLINE# mock_conn . request ( 'POST' , url , headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json' , #NEWLINE# #UNINDENT# } ) #NEWLINE# response = FakeResponse ( 200 , headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/json' , #NEWLINE# #UNINDENT# } ) #NEWLINE# mock_conn . getresponse ( ) . AndReturn ( response ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# client = nova . virt . docker . client . DockerHTTPClient ( response ) #NEWLINE# self . assertEqual ( True , client . pull_repository ( 'ping:pong' ) ) #NEWLINE# self . mox . VerifyAll ( )