#NEWLINE# def test_that_when_creating_a_function_from_zipfile_succeeds_the_create_function_method_returns_true( self ) : #NEWLINE# #INDENT# '\n        tests True function created.\n        ' #NEWLINE# with patch . dict ( boto_lambda . __salt__ , { #NEWLINE# #INDENT# 'boto_iam.get_account_id' : MagicMock ( return_value = '1234' ) , #NEWLINE# #UNINDENT# } ) : #NEWLINE# #INDENT# with TempZipFile ( ) as zipfile : #NEWLINE# #INDENT# self . conn . create_function . return_value = function_ret #NEWLINE# lambda_creation_result = boto_lambda . create_function ( FunctionName = 'testfunction' , Runtime = 'python2.7' , Role = 'myrole' , Handler = 'file.method' , ZipFile = zipfile , ** conn_parameters ) #NEWLINE# #UNINDENT# #UNINDENT# self . assertTrue ( lambda_creation_result [ 'created' ] )