#NEWLINE# def test_running_with_labels( self ) : #NEWLINE# #INDENT# '\n        Test dockerng.running with labels parameter.\n        ' #NEWLINE# dockerng_create = Mock ( ) #NEWLINE# __salt__ = { #NEWLINE# #INDENT# 'dockerng.list_containers' : MagicMock ( ) , #NEWLINE# 'dockerng.list_tags' : MagicMock ( ) , #NEWLINE# 'dockerng.pull' : MagicMock ( ) , #NEWLINE# 'dockerng.state' : MagicMock ( ) , #NEWLINE# 'dockerng.inspect_image' : MagicMock ( ) , #NEWLINE# 'dockerng.create' : self , #NEWLINE# #UNINDENT# } #NEWLINE# with patch . dict ( dockerng_state . __dict__ , { #NEWLINE# #INDENT# '__salt__' : __salt__ , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# dockerng_state . running ( 'cont' , image = 'image:latest' , labels = [ 'LABEL1' , 'LABEL2' ] ) #NEWLINE# #UNINDENT# dockerng_create . assert_called_with ( 'image:latest' , validate_input = False , validate_ip_addrs = False , name = 'cont' , labels = [ 'LABEL1' , 'LABEL2' ] , client_timeout = 60 )