# Path: mutant/contrib/file/models.py
# class FilePathFieldDefinition(CharFieldDefinition):
#     class Meta:
# 
# Path: mutant/test/testcases.py
# def connections_can_rollback_ddl():
#     def _use_transactions(cls):
#     def setUpClass(cls):
#     def tearDownClass(cls):
#     def _should_reload_connections(self):
#     def _fixture_setup(self):
#     def _fixture_teardown(self):
#     def tearDown(self):
#     def setUpTestData(cls):
#     def setUp(self):
#     def get_field_value(self, instance, name='field'):
#     def prepare_default_value(self, value):
#     def test_field_default(self):
#     def test_create_with_default(self):
#     def test_model_save(self):
#     def test_field_renaming(self):
#     def test_field_deletion(self):
#     def test_field_unique(self):
#     def test_field_cloning(self):
#     def test_field_definition_category(self):
# class DDLTestCase(TestCase):
# class ModelDefinitionDDLTestCase(DDLTestCase):
# class FieldDefinitionTestMixin(object):
# 
# Path: tests/utils.py
# class BaseModelDefinitionTestCase(ModelDefinitionDDLTestCase):
#     @classmethod
#     def setUpTestData(cls):
#         model_def = ModelDefinition.objects.create(app_label='mutant', object_name='Model')
#         cls.model_def_pk = model_def.pk
# 
#     def setUp(self):
#         self.model_def = ModelDefinition.objects.get(pk=self.model_def_pk)
# 
#     @classmethod
#     @contextmanager
#     def assertChecksumChange(cls, model_def=None):
#         if not model_def:
#             model_def = ModelDefinition.objects.get(pk=cls.model_def_pk)
#         checksum = model_def.model_class().checksum()
#         yield
#         if model_def.model_class().checksum() == checksum:
#             raise AssertionError("Checksum of model %s should have changed." % model_def)
# 
#     @classmethod
#     @contextmanager
#     def assertChecksumDoesntChange(cls, model_def=None):
#         if not model_def:
#             model_def = ModelDefinition.objects.get(pk=cls.model_def_pk)
#         try:
#             with cls.assertChecksumChange(model_def):
#                 yield
#         except AssertionError:
#             pass
#         else:
#             model_class = model_def.model_class()
#             raise AssertionError("Checksum of model %s shouldn't have changed." % model_class)
# 
#     def assertTableExists(self, db, table):
#         tables = connections[db].introspection.table_names()
#         msg = "Table '%s.%s' doesn't exist, existing tables are %s"
#         self.assertTrue(table in tables, msg % (db, table, tables))
# 
#     def assertTableDoesntExists(self, db, table):
#         tables = connections[db].introspection.table_names()
#         msg = "Table '%s.%s' exists, existing tables are %s"
#         self.assertFalse(table in tables, msg % (db, table, tables))
# 
#     def assertModelTablesExist(self, model):
#         table = model._meta.db_table
#         for db in allow_migrate(model):
#             self.assertTableExists(db, table)
# 
#     def assertModelTablesDontExist(self, model):
#         table = model._meta.db_table
#         for db in allow_migrate(model):
#             self.assertTableDoesntExists(db, table)
# 
#     def assertColumnExists(self, db, table, column):
#         columns = tuple(table_columns_iterator(db, table))
#         data = {
#             'db': db,
#             'table': table,
#             'column': column,
#             'columns': columns
#         }
#         self.assertIn(column, columns,
#                       "Column '%(db)s.%(table)s.%(column)s' doesn't exist, "
#                       "%(db)s.'%(table)s's columns are %(columns)s" % data)
# 
#     def assertColumnDoesntExists(self, db, table, column):
#         self.assertRaises(
#             AssertionError, self.assertColumnExists, db, table, column
#         )
# 
#     def assertModelTablesColumnExists(self, model, column):
#         table = model._meta.db_table
#         for db in allow_migrate(model):
#             self.assertColumnExists(db, table, column)
# 
#     def assertModelTablesColumnDoesntExists(self, model, column):
#         table = model._meta.db_table
#         for db in allow_migrate(model):
#             self.assertColumnDoesntExists(db, table, column)


import os
import sys
from django.utils.translation import ugettext_lazy as _
from mutant.contrib.file import models
from mutant.test import testcases
from .utils import BaseModelDefinitionTestCase
from __future__ import unicode_literals





PACKAGE_PATH = os.path.dirname(sys.modules[__name__].__file__)
MODULE_PATH = os.path.abspath(sys.modules[__name__].__file__)
MODELS_MODULE_PATH = os.path.abspath(models.__file__)


class FilePathFieldDefinitionTest(testcases.FieldDefinitionTestMixin,
                                  BaseModelDefinitionTestCase):
    field_definition_category = _('File')

# Path: mutant/contrib/file/models.py
# class FilePathFieldDefinition(CharFieldDefinition):
#     class Meta:
# 
# Path: mutant/test/testcases.py
# def connections_can_rollback_ddl():
#     def _use_transactions(cls):
#     def setUpClass(cls):
#     def tearDownClass(cls):
#     def _should_reload_connections(self):
#     def _fixture_setup(self):
#     def _fixture_teardown(self):
#     def tearDown(self):
#     def setUpTestData(cls):
#     def setUp(self):
#     def get_field_value(self, instance, name='field'):
#     def prepare_default_value(self, value):
#     def test_field_default(self):
#     def test_create_with_default(self):
#     def test_model_save(self):
#     def test_field_renaming(self):
#     def test_field_deletion(self):
#     def test_field_unique(self):
#     def test_field_cloning(self):
#     def test_field_definition_category(self):
# class DDLTestCase(TestCase):
# class ModelDefinitionDDLTestCase(DDLTestCase):
# class FieldDefinitionTestMixin(object):
# 
# Path: tests/utils.py
# class BaseModelDefinitionTestCase(ModelDefinitionDDLTestCase):
#     @classmethod
#     def setUpTestData(cls):
#         model_def = ModelDefinition.objects.create(app_label='mutant', object_name='Model')
#         cls.model_def_pk = model_def.pk
# 
#     def setUp(self):
#         self.model_def = ModelDefinition.objects.get(pk=self.model_def_pk)
# 
#     @classmethod
#     @contextmanager
#     def assertChecksumChange(cls, model_def=None):
#         if not model_def:
#             model_def = ModelDefinition.objects.get(pk=cls.model_def_pk)
#         checksum = model_def.model_class().checksum()
#         yield
#         if model_def.model_class().checksum() == checksum:
#             raise AssertionError("Checksum of model %s should have changed." % model_def)
# 
#     @classmethod
#     @contextmanager
#     def assertChecksumDoesntChange(cls, model_def=None):
#         if not model_def:
#             model_def = ModelDefinition.objects.get(pk=cls.model_def_pk)
#         try:
#             with cls.assertChecksumChange(model_def):
#                 yield
#         except AssertionError:
#             pass
#         else:
#             model_class = model_def.model_class()
#             raise AssertionError("Checksum of model %s shouldn't have changed." % model_class)
# 
#     def assertTableExists(self, db, table):
#         tables = connections[db].introspection.table_names()
#         msg = "Table '%s.%s' doesn't exist, existing tables are %s"
#         self.assertTrue(table in tables, msg % (db, table, tables))
# 
#     def assertTableDoesntExists(self, db, table):
#         tables = connections[db].introspection.table_names()
#         msg = "Table '%s.%s' exists, existing tables are %s"
#         self.assertFalse(table in tables, msg % (db, table, tables))
# 
#     def assertModelTablesExist(self, model):
#         table = model._meta.db_table
#         for db in allow_migrate(model):
#             self.assertTableExists(db, table)
# 
#     def assertModelTablesDontExist(self, model):
#         table = model._meta.db_table
#         for db in allow_migrate(model):
#             self.assertTableDoesntExists(db, table)
# 
#     def assertColumnExists(self, db, table, column):
#         columns = tuple(table_columns_iterator(db, table))
#         data = {
#             'db': db,
#             'table': table,
#             'column': column,
#             'columns': columns
#         }
#         self.assertIn(column, columns,
#                       "Column '%(db)s.%(table)s.%(column)s' doesn't exist, "
#                       "%(db)s.'%(table)s's columns are %(columns)s" % data)
# 
#     def assertColumnDoesntExists(self, db, table, column):
#         self.assertRaises(
#             AssertionError, self.assertColumnExists, db, table, column
#         )
# 
#     def assertModelTablesColumnExists(self, model, column):
#         table = model._meta.db_table
#         for db in allow_migrate(model):
#             self.assertColumnExists(db, table, column)
# 
#     def assertModelTablesColumnDoesntExists(self, model, column):
#         table = model._meta.db_table
#         for db in allow_migrate(model):
#             self.assertColumnDoesntExists(db, table, column)


# Path: tests/test_contrib_file.py
import os
import sys
from django.utils.translation import ugettext_lazy as _
from mutant.contrib.file import models
from mutant.test import testcases
from .utils import BaseModelDefinitionTestCase

from __future__ import unicode_literals





PACKAGE_PATH = os.path.dirname(sys.modules[__name__].__file__)
MODULE_PATH = os.path.abspath(sys.modules[__name__].__file__)
MODELS_MODULE_PATH = os.path.abspath(models.__file__)


class FilePathFieldDefinitionTest(testcases.FieldDefinitionTestMixin,
                                  BaseModelDefinitionTestCase):
    field_definition_category = _('File')

    field_definition_cls = models.FilePathFieldDefinition