#NEWLINE# def test__deploy_zapp_container_not_empty( self ) : #NEWLINE# #INDENT# self . conn . get_container . return_value = ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , [ 'file1' ] ) #NEWLINE# with pytest . raises ( zpmlib . ZPMException ) as exc : #NEWLINE# #INDENT# zpm . _deploy_zapp ( self . conn , 'target/dir1/dir2' , None , None ) #NEWLINE# #UNINDENT# assert ( str ( exc . value ) == "Target container ('target') is not empty.\nDeploying to a non-empty container can cause consistency problems with overwritten objects.\nSpecify the flag `--force/-f` to overwrite anyway." ) #NEWLINE# assert ( self . conn . get_container . call_args_list == [ mock . call ( 'target' ) ] )