Exemplo n.º 1
0
    def setup(self):
        TempDirHelper.setup(self)

        self.loader = DjangoLoader()
        settings.TEMPLATE_LOADERS = [
            'django.template.loaders.filesystem.Loader',
        ]
        settings.TEMPLATE_DIRS = [self.tempdir]
Exemplo n.º 2
0
    def setup(self):
        TempDirHelper.setup(self)

        self.loader = DjangoLoader()
        settings.TEMPLATE_LOADERS = [
            'django.template.loaders.filesystem.Loader',
        ]
        settings.TEMPLATE_DIRS = [self.tempdir]
Exemplo n.º 3
0
    def setup(self):
        TempDirHelper.setup(self)

        # Reset the webassets environment.
        django_env_reset()
        self.m = get_env()

        # Use a temporary directory as MEDIA_ROOT
        settings.MEDIA_ROOT = self.create_directories('media')[0]

        # Some other settings without which we are likely to run
        # into errors being raised as part of validation.
        setattr(settings, 'DATABASES', {})
        settings.DATABASES['default'] = {'ENGINE': ''}

        # Unless we explicitly test it, we don't want to use
        # the cache during testing.
        self.m.cache = False
Exemplo n.º 4
0
    def setup(self):
        TempDirHelper.setup(self)

        # Reset the webassets environment.
        django_env_reset()
        self.m = get_env()

        # Use a temporary directory as MEDIA_ROOT
        settings.MEDIA_ROOT = self.create_directories('media')[0]

        # Some other settings without which we are likely to run
        # into errors being raised as part of validation.
        setattr(settings, 'DATABASES', {})
        settings.DATABASES['default'] = {'ENGINE': ''}

        # Unless we explicitly test it, we don't want to use
        # the cache during testing.
        self.m.cache = False
Exemplo n.º 5
0
    def setup(self):
        TempDirHelper.setup(self)

        # Reset the webassets environment.
        django_env_reset()
        self.env = get_env()

        # Use a temporary directory as MEDIA_ROOT
        settings.MEDIA_ROOT = self.create_directories("media")[0]

        # Some other settings without which we are likely to run
        # into errors being raised as part of validation.
        setattr(settings, "DATABASES", {})
        settings.DATABASES["default"] = {"ENGINE": ""}

        # Unless we explicitly test it, we don't want to use the cache during
        # testing.
        self.env.cache = False
        self.env.manifest = False