#NEWLINE# def test_cloud_init_success_errors( self ) : #NEWLINE# #INDENT# fake_server = mock . Mock ( ) #NEWLINE# result_json_text = textwrap . dedent ( '\n        {\n          "v1": {\n            "errors": ["omg!"],\n            "datasource": "DataSourceFoo"\n          }\n        }\n        ' ) #NEWLINE# fake_server . ssh . execute . return_value = ( 0 , result_json_text , '' ) #NEWLINE# self . assertRaises ( RuntimeError , provider . _cloud_init_success , fake_server )