#NEWLINE# def test_get_image_404_xml( self ) : #NEWLINE# #INDENT# request = webob . Request . blank ( '/v1.0/images/NonExistantImage' ) #NEWLINE# request . accept = 'application/xml' #NEWLINE# response = request . get_response ( fakes . wsgi_app ( ) ) #NEWLINE# self . assertEqual ( 404 , response . status_int ) #NEWLINE# expected = minidom . parseString ( '\n            <itemNotFound code="404"\n                    xmlns="http://docs.rackspacecloud.com/servers/api/v1.0">\n                <message>\n                    Image not found.\n                </message>\n            </itemNotFound>\n        ' . replace ( '  ' , '' ) ) #NEWLINE# actual = minidom . parseString ( response . body . replace ( '  ' , '' ) ) #NEWLINE# self . assertEqual ( expected . toxml ( ) , actual . toxml ( ) )