# Path: botoflow/utils.py
# def camel_keys_to_snake_case(dictionary):
#     """
#     Translate a dictionary containing camelCase keys into dictionary with
#     snake_case keys that match python kwargs well.
#     """
#     output = {}
#     for original_key in dictionary.keys():
#         # insert an underscore before any word beginning with a capital followed by lower case
#         translated_key = _first_cap_replace.sub(r'\1_\2', original_key)
#         # insert an underscore before any remaining capitals that follow lower case characters
#         translated_key = _remainder_cap_replace.sub(r'\1_\2', translated_key).lower()
#         output[translated_key] = dictionary[original_key]
#     return output
# 
# def snake_keys_to_camel_case(dictionary):
#     """
#     Translate a dictionary containing snake_case keys into dictionary with
#     camelCase keys as required for decision dicts.
#     """
#     output = {}
#     for original_key in dictionary.keys():
#         components = original_key.split('_')
#         translated_key = components[0] + ''.join([component.title() for component in components[1:]])
#         output[translated_key] = dictionary[original_key]
#     return output


import unittest
from botoflow.utils import camel_keys_to_snake_case, snake_keys_to_camel_case



class TestUtils(unittest.TestCase):

    def test_camel_keys_to_snake_case(self):
        d = {
            'workflowType': 'A',
            'taskList': 'B',
            'childPolicy': 'C',
            'executionStartToCloseTimeout': 'D',
            'taskStartToCloseTimeout': 'E',
            'input': 'F',
            'workflowId': 'G',
            'domain': 'H'
        }


# Path: botoflow/utils.py
# def camel_keys_to_snake_case(dictionary):
#     """
#     Translate a dictionary containing camelCase keys into dictionary with
#     snake_case keys that match python kwargs well.
#     """
#     output = {}
#     for original_key in dictionary.keys():
#         # insert an underscore before any word beginning with a capital followed by lower case
#         translated_key = _first_cap_replace.sub(r'\1_\2', original_key)
#         # insert an underscore before any remaining capitals that follow lower case characters
#         translated_key = _remainder_cap_replace.sub(r'\1_\2', translated_key).lower()
#         output[translated_key] = dictionary[original_key]
#     return output
# 
# def snake_keys_to_camel_case(dictionary):
#     """
#     Translate a dictionary containing snake_case keys into dictionary with
#     camelCase keys as required for decision dicts.
#     """
#     output = {}
#     for original_key in dictionary.keys():
#         components = original_key.split('_')
#         translated_key = components[0] + ''.join([component.title() for component in components[1:]])
#         output[translated_key] = dictionary[original_key]
#     return output


# Path: test/unit/test_utils.py
import unittest
from botoflow.utils import camel_keys_to_snake_case, snake_keys_to_camel_case




class TestUtils(unittest.TestCase):

    def test_camel_keys_to_snake_case(self):
        d = {
            'workflowType': 'A',
            'taskList': 'B',
            'childPolicy': 'C',
            'executionStartToCloseTimeout': 'D',
            'taskStartToCloseTimeout': 'E',
            'input': 'F',
            'workflowId': 'G',
            'domain': 'H'
        }


        self.assertDictEqual(camel_keys_to_snake_case(d), {