#NEWLINE# def test_imports_missing_req_field_in_def( self ) : #NEWLINE# #INDENT# tpl_snippet = '\n        imports:\n          - more_definitions:\n              file1: my_defns/my_typesdefs_n.yaml\n              repository: my_company_repo\n              namespace_uri: http://mycompany.com/ns/tosca/2.0\n              namespace_prefix: mycompany\n        ' #NEWLINE# errormsg = _ ( 'Import of template "more_definitions" is missing required field "file".' ) #NEWLINE# path = 'toscaparser/tests/data/tosca_elk.yaml' #NEWLINE# err = self . assertRaises ( exception . MissingRequiredFieldError , errormsg . _imports_content_test , tpl_snippet , path , None ) #NEWLINE# self . assertEqual ( errormsg , err . __str__ ( ) )