在我的烧瓶应用程序中,我使用 Sqlite 进行测试 现在我想将其更改为 postgresql 但出现错误 OperationalError: (OperationalError) FATAL: database "mytest" does not exist 无 无 我在做对吗?问题出在哪里,谢谢
配置文件:
class TestingConfig(Config):
DEBUG = True
TESTING = True
PRESERVE_CONTEXT_ON_EXCEPTION = False
SQLALCHEMY_DATABASE_URI = os.environ.get('TEST_DATABASE_URL') or \
os.environ.get('DATABASE_URL','postgresql+psycopg2://admin:password@localhost/mytest')
print SQLALCHEMY_DATABASE_URI