# Path: deckhand/service.py
# CONF = cfg.CONF
# LOG = log.getLogger(__name__)
# def configure_app(app, version=''):
# def deckhand_app_factory(global_config, **local_config):
# 
# Path: deckhand/tests/unit/base.py
# CONF = cfg.CONF
# class DeckhandTestCase(testtools.TestCase):
# class DeckhandWithDBTestCase(DeckhandTestCase):
#     def setUp(self):
#     def override_config(self, name, override, group=None):
#     def assertEmpty(self, collection):
#     def assertDictItemsAlmostEqual(self, first, second, ignore):
#     def patch(self, target, autospec=True, **kwargs):
#     def patchobject(self, target, attribute, new=mock.DEFAULT, **kwargs):
#     def setUp(self):
# 
# Path: deckhand/tests/unit/fixtures.py
# CONF = cfg.CONF
# class ConfPatcher(fixtures.Fixture):
# class RealPolicyFixture(fixtures.Fixture):
#     def __init__(self, **kwargs):
#     def setUp(self):
#     def __init__(self, verify=True, *args, **kwargs):
#     def _setUp(self):
#     def _verify_policies_match(self):
#     def _install_policy_verification_hook(self):
#         def enforce_policy_and_remember_actual_rules(
#                 action, *a, **k):
#     def add_missing_default_rules(self, rules):
#     def set_rules(self, rules, overwrite=True):


import os
import yaml
from falcon import testing as falcon_testing
from deckhand import service
from deckhand.tests.unit import base as test_base
from deckhand.tests.unit import fixtures
# Copyright 2017 AT&T Intellectual Property.  All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.





class BaseControllerTest(test_base.DeckhandWithDBTestCase,
                         falcon_testing.TestCase):
    """Base class for unit testing falcon controllers."""

    def setUp(self):
        super(BaseControllerTest, self).setUp()
        self.app = falcon_testing.TestClient(
            service.deckhand_app_factory(None))
        self.policy = self.useFixture(fixtures.RealPolicyFixture())
        # NOTE: development_mode allows these unit tests to get around
        # Keystone authentication.

# Path: deckhand/service.py
# CONF = cfg.CONF
# LOG = log.getLogger(__name__)
# def configure_app(app, version=''):
# def deckhand_app_factory(global_config, **local_config):
# 
# Path: deckhand/tests/unit/base.py
# CONF = cfg.CONF
# class DeckhandTestCase(testtools.TestCase):
# class DeckhandWithDBTestCase(DeckhandTestCase):
#     def setUp(self):
#     def override_config(self, name, override, group=None):
#     def assertEmpty(self, collection):
#     def assertDictItemsAlmostEqual(self, first, second, ignore):
#     def patch(self, target, autospec=True, **kwargs):
#     def patchobject(self, target, attribute, new=mock.DEFAULT, **kwargs):
#     def setUp(self):
# 
# Path: deckhand/tests/unit/fixtures.py
# CONF = cfg.CONF
# class ConfPatcher(fixtures.Fixture):
# class RealPolicyFixture(fixtures.Fixture):
#     def __init__(self, **kwargs):
#     def setUp(self):
#     def __init__(self, verify=True, *args, **kwargs):
#     def _setUp(self):
#     def _verify_policies_match(self):
#     def _install_policy_verification_hook(self):
#         def enforce_policy_and_remember_actual_rules(
#                 action, *a, **k):
#     def add_missing_default_rules(self, rules):
#     def set_rules(self, rules, overwrite=True):


# Path: deckhand/tests/unit/control/base.py
import os
import yaml
from falcon import testing as falcon_testing
from deckhand import service
from deckhand.tests.unit import base as test_base
from deckhand.tests.unit import fixtures

# Copyright 2017 AT&T Intellectual Property.  All other rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.





class BaseControllerTest(test_base.DeckhandWithDBTestCase,
                         falcon_testing.TestCase):
    """Base class for unit testing falcon controllers."""

    def setUp(self):
        super(BaseControllerTest, self).setUp()
        self.app = falcon_testing.TestClient(
            service.deckhand_app_factory(None))
        self.policy = self.useFixture(fixtures.RealPolicyFixture())
        # NOTE: development_mode allows these unit tests to get around
        # Keystone authentication.

        self.useFixture(fixtures.ConfPatcher(development_mode=True))