#NEWLINE# @ mock . patch ( 'requests.get' ) #NEWLINE# @ ddt . data ( 404 , 500 ) #NEWLINE# def test__download_cirros_image_failure( self , status_code , mock_get ) : #NEWLINE# #INDENT# self . mock_isfile . return_value = False #NEWLINE# mock_get . return_value = mock . MagicMock ( status_code = status_code ) #NEWLINE# self . assertRaises ( exceptions . TempestConfigCreationFailure , self . tempest_conf . _download_cirros_image )