# Path: watcher_dashboard/test/helpers.py
# class WatcherTestsMixin(object):
# class TestCase(WatcherTestsMixin, helpers.TestCase):
# class APITestCase(WatcherTestsMixin, helpers.APITestCase):
# class BaseAdminViewTests(WatcherTestsMixin, helpers.BaseAdminViewTests):
#     def _setup_test_data(self):
#     def setUp(self):
#     def tearDown(self):
#     def stub_watcherclient(self):
# 
# Path: watcher_dashboard/utils/utils.py
# CAMEL_RE = re.compile(r'([A-Z][a-z]+|[A-Z]+(?=[A-Z\s]|$))')
# def de_camel_case(text):
# def list_to_dict(object_list, key_attribute='id'):
# def length(iterator):
# def check_image_type(image, image_type):
# def filter_items(items, **kwargs):
# def safe_int_cast(value):


import collections
from watcher_dashboard.test import helpers
from watcher_dashboard.utils import utils
#    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 UtilsTests(helpers.TestCase):
    def test_de_camel_case(self):
        ret = utils.de_camel_case('CamelCaseString')
        self.assertEqual(ret, 'Camel Case String')
        ret = utils.de_camel_case('SecureSSLConnection')
        self.assertEqual(ret, 'Secure SSL Connection')
        ret = utils.de_camel_case('xxXXxx')
        self.assertEqual(ret, 'xx X Xxx')
        ret = utils.de_camel_case('XXX')
        self.assertEqual(ret, 'XXX')
        ret = utils.de_camel_case('NON Camel Case')
        self.assertEqual(ret, 'NON Camel Case')

    def test_list_to_dict(self):
        Item = collections.namedtuple('Item', 'id')

# Path: watcher_dashboard/test/helpers.py
# class WatcherTestsMixin(object):
# class TestCase(WatcherTestsMixin, helpers.TestCase):
# class APITestCase(WatcherTestsMixin, helpers.APITestCase):
# class BaseAdminViewTests(WatcherTestsMixin, helpers.BaseAdminViewTests):
#     def _setup_test_data(self):
#     def setUp(self):
#     def tearDown(self):
#     def stub_watcherclient(self):
# 
# Path: watcher_dashboard/utils/utils.py
# CAMEL_RE = re.compile(r'([A-Z][a-z]+|[A-Z]+(?=[A-Z\s]|$))')
# def de_camel_case(text):
# def list_to_dict(object_list, key_attribute='id'):
# def length(iterator):
# def check_image_type(image, image_type):
# def filter_items(items, **kwargs):
# def safe_int_cast(value):


# Path: watcher_dashboard/utils/tests.py
import collections
from watcher_dashboard.test import helpers
from watcher_dashboard.utils import utils

#    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 UtilsTests(helpers.TestCase):
    def test_de_camel_case(self):
        ret = utils.de_camel_case('CamelCaseString')
        self.assertEqual(ret, 'Camel Case String')
        ret = utils.de_camel_case('SecureSSLConnection')
        self.assertEqual(ret, 'Secure SSL Connection')
        ret = utils.de_camel_case('xxXXxx')
        self.assertEqual(ret, 'xx X Xxx')
        ret = utils.de_camel_case('XXX')
        self.assertEqual(ret, 'XXX')
        ret = utils.de_camel_case('NON Camel Case')
        self.assertEqual(ret, 'NON Camel Case')

    def test_list_to_dict(self):
        Item = collections.namedtuple('Item', 'id')

        ret = utils.list_to_dict([Item('foo'), Item('bar'), Item('bar')])