Ejemplo n.º 1
0
    def setUp(self):
        super(APIV2ZoneImportExportTest, self).setUp()

        self.config(enable_api_admin=True, group='service:api')
        self.config(enabled_extensions_admin=['zones'], group='service:api')
        # Create the application
        adminapp = admin_api.factory({})
        # Inject the NormalizeURIMiddleware middleware
        adminapp = middleware.NormalizeURIMiddleware(adminapp)
        # Inject the FaultWrapper middleware
        adminapp = middleware.FaultWrapperMiddleware(adminapp)
        # Inject the TestContext middleware
        adminapp = middleware.TestContextMiddleware(
            adminapp, self.admin_context.tenant,
            self.admin_context.tenant)
        # Obtain a test client
        self.adminclient = TestApp(adminapp)
Ejemplo n.º 2
0
    def setUp(self):
        super(APIV2ZoneImportExportTest, self).setUp()

        self.config(enable_api_admin=True, group='service:api')
        self.config(enabled_extensions_admin=['zones'], group='service:api')
        # Create the application
        adminapp = admin_api.factory({})
        # Inject the NormalizeURIMiddleware middleware
        adminapp = middleware.NormalizeURIMiddleware(adminapp)
        # Inject the FaultWrapper middleware
        adminapp = middleware.FaultWrapperMiddleware(adminapp)
        # Inject the TestContext middleware
        adminapp = middleware.TestContextMiddleware(adminapp,
                                                    self.admin_context.tenant,
                                                    self.admin_context.tenant)
        # Obtain a test client
        self.adminclient = TestApp(adminapp)
Ejemplo n.º 3
0
    def setUp(self):
        super(AdminApiTestCase, self).setUp()

        # Ensure the v2 API is enabled
        self.config(enable_api_admin=True, group="service:api")

        # Create the application
        self.app = admin_api.factory({})

        # Inject the NormalizeURIMiddleware middleware
        self.app = middleware.NormalizeURIMiddleware(self.app)

        # Inject the FaultWrapper middleware
        self.app = middleware.FaultWrapperMiddleware(self.app)

        # Inject the TestContext middleware
        self.app = middleware.TestContextMiddleware(self.app, self.admin_context.tenant, self.admin_context.tenant)

        # Obtain a test client
        self.client = TestApp(self.app)
Ejemplo n.º 4
0
    def setUp(self):
        super(AdminApiTestCase, self).setUp()

        # Ensure the v2 API is enabled
        self.config(enable_api_admin=True, group='service:api')

        # Create the application
        self.app = admin_api.factory({})

        # Inject the NormalizeURIMiddleware middleware
        self.app = middleware.NormalizeURIMiddleware(self.app)

        # Inject the FaultWrapper middleware
        self.app = middleware.FaultWrapperMiddleware(self.app)

        # Inject the TestContext middleware
        self.app = middleware.TestContextMiddleware(
            self.app, self.admin_context.project_id,
            self.admin_context.project_id)

        # Obtain a test client
        self.client = TestApp(self.app)