Example #1
0
    def setUp(self):
        super(APITestCase, self).setUp()

        CONF.set_override("auth_enable", False, group='pecan')

        self.app = pecan.testing.load_test_app(dict(app.get_pecan_config()))

        self.patch_context = mock.patch(
            'oslo_context.context.RequestContext.from_environ')
        self.mock_context = self.patch_context.start()

        self.mock_context.return_value = self.context
Example #2
0
    def setUp(self):
        super(APITestCase, self).setUp()

        CONF.set_override('auth_enable', False, group='pecan')

        self.app = pecan.testing.load_test_app(dict(app.get_pecan_config()))

        self.patch_context = mock.patch(
            'oslo_context.context.RequestContext.from_environ')
        self.mock_context = self.patch_context.start()
        self.addCleanup(self.patch_context.stop)
        self.mock_context.return_value = self.context

        self.config(lock_path=tempfile.mkdtemp(), group='oslo_concurrency')