通过运行'/管理“py测试”,来自本地“postgres”数据库的数据填充到“test\u postgres”数据库中。我无法找到方法,如何禁用此行为。
通过运行'/管理py test’,我想用应用的迁移获取未填充的数据库。
class Local(Common):
DEBUG = True
# Testing
INSTALLED_APPS = Common.INSTALLED_APPS
INSTALLED_APPS += ('django_nose',)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
NOSE_ARGS = [
BASE_DIR,
'-s',
'--nologcapture',
'--with-coverage',
'--with-progressive'
]
# Postgres
DATABASES = {
'default': dj_database_url.config(
default='postgres://postgres:@postgres:5432/postgres',
conn_max_age=int(os.getenv('POSTGRES_CONN_MAX_AGE', 600)),
)
}