def test_get_resources(self):
    res_ext = base_extensions.ResourceExtension('tweedles', StubController(response_body))
    manager = StubExtensionManager(res_ext)
    app = compute.APIRouter(manager)
    request = webob.Request.blank('/fake/tweedles')
    response = request.get_response(app)
    self.assertEqual(200, response.status_int)
    self.assertEqual(response_body, response.body)
def test_get_resources(self):
    res_ext = base_extensions.ResourceExtension('tweedles', StubController(response_body))
    manager = StubExtensionManager(res_ext)
    app = compute.APIRouter(manager)
    request = webob.Request.blank('/fake/tweedles')
    response = request.get_response(app)
    self.assertEqual(200, response.status_int)
    self.assertEqual(response_body, response.body)