# Path: common/utilities.py
# def camel_to_delimiter_separated(name, glue='_'):
# def is_valid_email_address(address):
# def is_common_password(passwd):


    from builtins import *  # pylint: disable=unused-wildcard-import,redefined-builtin,wildcard-import
from common import utilities
    import sys
import warnings
        'HTTPResponseCodeXYZ': 'http_response_code_xyz',
        # https://gist.github.com/jaytaylor/3660565
        'snakesOnAPlane': 'snakes_on_a_plane',
        'SnakesOnAPlane': 'snakes_on_a_plane',
        'snakes_on_a_plane': 'snakes_on_a_plane',
        'IPhoneHysteria': 'i_phone_hysteria',
        'iPhoneHysteria': 'i_phone_hysteria',
        # These strings aren't camel case so it should do something weird:
        '_Test': '__test',
        '_test_Method': '_test__method',
        '__test__Method': '__test___method',
        '__CamelCase': '___camel_case',
        '_Camel_Case': '__camel__case',
        # This one might want a fix some day, but it is also bad camel case:
        'getHTTPresponseCode': 'get_htt_presponse_code'
    }

    for camel, snake in test_strings.items():
        assert utilities.camel_to_delimiter_separated(camel) == snake

def test_camel_to_kebab_case():
    """ camel_to_delimiter_separated also takes a glue parameter to allow for kebab-case. """
    assert utilities.camel_to_delimiter_separated('Camel2Camel2Case', glue='-') == \
        'camel2-camel2-case'

def test_is_common_password():
    """ Detect common passwords. """
    assert utilities.is_common_password('password')
    assert utilities.is_common_password('Password')
    assert utilities.is_common_password('PASSWORD')

# Path: common/utilities.py
# def camel_to_delimiter_separated(name, glue='_'):
# def is_valid_email_address(address):
# def is_common_password(passwd):


# Path: tests/common/test_utilities.py
    from builtins import *  # pylint: disable=unused-wildcard-import,redefined-builtin,wildcard-import
from common import utilities
    import sys
import warnings

        'HTTPResponseCodeXYZ': 'http_response_code_xyz',
        # https://gist.github.com/jaytaylor/3660565
        'snakesOnAPlane': 'snakes_on_a_plane',
        'SnakesOnAPlane': 'snakes_on_a_plane',
        'snakes_on_a_plane': 'snakes_on_a_plane',
        'IPhoneHysteria': 'i_phone_hysteria',
        'iPhoneHysteria': 'i_phone_hysteria',
        # These strings aren't camel case so it should do something weird:
        '_Test': '__test',
        '_test_Method': '_test__method',
        '__test__Method': '__test___method',
        '__CamelCase': '___camel_case',
        '_Camel_Case': '__camel__case',
        # This one might want a fix some day, but it is also bad camel case:
        'getHTTPresponseCode': 'get_htt_presponse_code'
    }

    for camel, snake in test_strings.items():
        assert utilities.camel_to_delimiter_separated(camel) == snake

def test_camel_to_kebab_case():
    """ camel_to_delimiter_separated also takes a glue parameter to allow for kebab-case. """
    assert utilities.camel_to_delimiter_separated('Camel2Camel2Case', glue='-') == \
        'camel2-camel2-case'

def test_is_common_password():
    """ Detect common passwords. """
    assert utilities.is_common_password('password')
    assert utilities.is_common_password('Password')
    assert utilities.is_common_password('PASSWORD')

    assert not utilities.is_common_password('foobar')