# Path: django_test_tools/utils.py
# def convert_to_snake_case(camel_case):
#     """
#     Converts a CamelCase name to snake case.
#     ..code-block:: python
# 
#         camel_case = 'OperatingSystemLongName'
#         snake_case = convert_to_snake_case(camel_case)
#         self.assertEqual(snake_case, 'operating_system_long_name')
# 
#     :param camel_case: string. Camel case name
#     :return: string. Snake case name
#     """
#     s1 = first_cap_re.sub(r'\1_\2', camel_case)
#     return all_cap_re.sub(r'\1_\2', s1).lower()


from ..utils import convert_to_snake_case
            {1}_02.save()
            self.fail('Test should have raised and integrity error')
        except IntegrityError as e:
            self.assertEqual(str(e), '') #FIXME This test is incomplete
"""


# noinspection PyProtectedMember,PyProtectedMember
class ModelTestCaseGenerator(object):
    def __init__(self, model):
        self.model = model

    def _generate(self):
        model_test_case_content = list()
        model_test_case_content.append({'print': PRINT_TEST_CLASS,
                                        'args': [self.model.__name__,
                                                 convert_to_snake_case(self.model.__name__)]})
        model_test_case_content.append({'print': PRINT_TEST_ATTRIBUTE_COUNT,
                                        'args': [self.model.__name__,
                                                 convert_to_snake_case(self.model.__name__),
                                                 len(self.model._meta.fields)]})

        content_text = PRINT_TEST_ATTRIBUTE_CONTENT.format(self.model.__name__,
                                                           convert_to_snake_case(self.model.__name__))
        PRINT_IMPORTS.append('from {} import {}'.format(self.model.__module__, self.model.__name__))
        PRINT_IMPORTS.append('from ..factories import {}Factory'.format(self.model.__name__))

        for field in self.model._meta.fields:
            field_type = type(field).__name__
            field_data = dict()

# Path: django_test_tools/utils.py
# def convert_to_snake_case(camel_case):
#     """
#     Converts a CamelCase name to snake case.
#     ..code-block:: python
# 
#         camel_case = 'OperatingSystemLongName'
#         snake_case = convert_to_snake_case(camel_case)
#         self.assertEqual(snake_case, 'operating_system_long_name')
# 
#     :param camel_case: string. Camel case name
#     :return: string. Snake case name
#     """
#     s1 = first_cap_re.sub(r'\1_\2', camel_case)
#     return all_cap_re.sub(r'\1_\2', s1).lower()


# Path: django_test_tools/generators/model_test_gen.py
from ..utils import convert_to_snake_case

            {1}_02.save()
            self.fail('Test should have raised and integrity error')
        except IntegrityError as e:
            self.assertEqual(str(e), '') #FIXME This test is incomplete
"""


# noinspection PyProtectedMember,PyProtectedMember
class ModelTestCaseGenerator(object):
    def __init__(self, model):
        self.model = model

    def _generate(self):
        model_test_case_content = list()
        model_test_case_content.append({'print': PRINT_TEST_CLASS,
                                        'args': [self.model.__name__,
                                                 convert_to_snake_case(self.model.__name__)]})
        model_test_case_content.append({'print': PRINT_TEST_ATTRIBUTE_COUNT,
                                        'args': [self.model.__name__,
                                                 convert_to_snake_case(self.model.__name__),
                                                 len(self.model._meta.fields)]})

        content_text = PRINT_TEST_ATTRIBUTE_CONTENT.format(self.model.__name__,
                                                           convert_to_snake_case(self.model.__name__))
        PRINT_IMPORTS.append('from {} import {}'.format(self.model.__module__, self.model.__name__))
        PRINT_IMPORTS.append('from ..factories import {}Factory'.format(self.model.__name__))

        for field in self.model._meta.fields:
            field_type = type(field).__name__
            field_data = dict()

            assertion = '        self.assertIsNotNone({0}.{1})\n'.format(convert_to_snake_case(self.model.__name__),