# Path: aodh/api/controllers/v2/capabilities.py
# def _decode_unicode(input):
# def _recursive_keypairs(d, separator=':'):
# def _flatten_capabilities(capabilities):
#     def sample(cls):
#     def get(self):
# class Capabilities(base.Base):
# class CapabilitiesController(rest.RestController):


from oslotest import base
from aodh.api.controllers.v2 import capabilities
# 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 TestCapabilities(base.BaseTestCase):

    def test_recursive_keypairs(self):
        data = {'a': 'A', 'b': 'B',
                'nested': {'a': 'A', 'b': 'B'}}

# Path: aodh/api/controllers/v2/capabilities.py
# def _decode_unicode(input):
# def _recursive_keypairs(d, separator=':'):
# def _flatten_capabilities(capabilities):
#     def sample(cls):
#     def get(self):
# class Capabilities(base.Base):
# class CapabilitiesController(rest.RestController):


# Path: aodh/tests/unit/test_api_v2_capabilities.py
from oslotest import base
from aodh.api.controllers.v2 import capabilities

# 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 TestCapabilities(base.BaseTestCase):

    def test_recursive_keypairs(self):
        data = {'a': 'A', 'b': 'B',
                'nested': {'a': 'A', 'b': 'B'}}

        pairs = list(capabilities._recursive_keypairs(data))