Beispiel #1
0
 def test_paste_app_not_found(self):
     # Verify response code for exception.PasteAppNotFound
     name = "fake_name"
     path = "fake_path"
     e = exception.PasteAppNotFound(name=name, path=path)
     self.assertEqual(404, e.code)
     self.assertIn(name, e.msg)
     self.assertIn(path, e.msg)
Beispiel #2
0
    def load_app(self, name):
        """Return the paste URLMap wrapped WSGI application.

        :param name: Name of the application to load.
        :returns: Paste URLMap object wrapping the requested application.
        :raises: `manila.exception.PasteAppNotFound`

        """
        try:
            return deploy.loadapp("config:%s" % self.config_path, name=name)
        except LookupError as err:
            LOG.error(err)
            raise exception.PasteAppNotFound(name=name, path=self.config_path)