# Path: tenant_schemas/utils.py
# def get_tenant_model():
#     return get_model(*settings.TENANT_MODEL.split("."))


from django.apps import apps
from django.core.checks import Critical, Error, Warning
from django.test import TestCase
from django.test.utils import override_settings
from tenant_schemas.apps import best_practice
from tenant_schemas.utils import get_tenant_model
        from django.conf import settings
        from django.conf import settings
        from django.conf import settings
                    obj="django.conf.settings",
                    hint="This is necessary to overwrite built-in django "
                         "management commands with their schema-aware "
                         "implementations.",
                    id="tenant_schemas.W001"),
        ])

    @override_settings(INSTALLED_APPS=[
        'dts_test_app',
        'customers',
        'tenant_schemas',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
    ])
    def test_tenant_schemas_after_custom_apps_in_installed_apps(self):
        self.assertBestPractice([])

    @override_settings(TENANT_APPS=())
    def test_tenant_apps_empty(self):
        self.assertBestPractice([
            Error("TENANT_APPS is empty.",
                  hint="Maybe you don't need this app?",
                  id="tenant_schemas.E001"),
        ])

    @override_settings(PG_EXTRA_SEARCH_PATHS=['public', 'demo1', 'demo2'])
    def test_public_schema_on_extra_search_paths(self):

# Path: tenant_schemas/utils.py
# def get_tenant_model():
#     return get_model(*settings.TENANT_MODEL.split("."))


# Path: tenant_schemas/tests/test_apps.py
from django.apps import apps
from django.core.checks import Critical, Error, Warning
from django.test import TestCase
from django.test.utils import override_settings
from tenant_schemas.apps import best_practice
from tenant_schemas.utils import get_tenant_model
        from django.conf import settings
        from django.conf import settings
        from django.conf import settings

                    obj="django.conf.settings",
                    hint="This is necessary to overwrite built-in django "
                         "management commands with their schema-aware "
                         "implementations.",
                    id="tenant_schemas.W001"),
        ])

    @override_settings(INSTALLED_APPS=[
        'dts_test_app',
        'customers',
        'tenant_schemas',
        'django.contrib.auth',
        'django.contrib.contenttypes',
        'django.contrib.sessions',
        'django.contrib.messages',
        'django.contrib.staticfiles',
    ])
    def test_tenant_schemas_after_custom_apps_in_installed_apps(self):
        self.assertBestPractice([])

    @override_settings(TENANT_APPS=())
    def test_tenant_apps_empty(self):
        self.assertBestPractice([
            Error("TENANT_APPS is empty.",
                  hint="Maybe you don't need this app?",
                  id="tenant_schemas.E001"),
        ])

    @override_settings(PG_EXTRA_SEARCH_PATHS=['public', 'demo1', 'demo2'])
    def test_public_schema_on_extra_search_paths(self):

        TenantModel = get_tenant_model()