def configure(self, **kwargs):
        migrate = self.args.get('--migrate', False)
        kwargs['SOUTH_TESTS_MIGRATE'] = migrate
        
        if not 'DATABASES' in self.new_settings:
            default_name = ':memory:' if self.args.get('test', False) else 'local.sqlite'
            db_url = os.environ.get("DATABASE_URL", "sqlite://localhost/%s" % default_name)
            kwargs['DATABASES'] = {'default': dj_database_url.parse(db_url)}
            
        tmp_dir_prefix = '%s-test-tmpdir' % self.appname
        with temp_dir(prefix=tmp_dir_prefix) as STATIC_ROOT:
            with temp_dir(prefix=tmp_dir_prefix) as MEDIA_ROOT:
                if not 'MEDIA_ROOT' in self.new_settings:
                    kwargs['MEDIA_ROOT'] = MEDIA_ROOT
                if not 'STATIC_ROOT' in self.new_settings:
                     kwargs['STATIC_ROOT'] = STATIC_ROOT
                kwargs.update(self.new_settings)
                settings.configure(default_settings=self.default_settings, **kwargs)
                return settings
dataset/ETHPy150Open fivethreeo/django-easytests/djeasytests/testsetup.py/TestSetup.configure/original