Tests
- Improved directory structure - Added functional and unit tests
This commit is contained in:
26
api/app/config/flask.cfg
Normal file
26
api/app/config/flask.cfg
Normal file
@@ -0,0 +1,26 @@
|
||||
import os
|
||||
from app.schema import BaseResponseSchema
|
||||
|
||||
# Flask settings
|
||||
SECRET_KEY = os.getenv('SECRET_KEY', 'secret string')
|
||||
|
||||
|
||||
# Flask-SQLAlchemy settings
|
||||
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://" + os.getenv('MYSQL_USER') + ":" + os.getenv('MYSQL_PASSWORD') + "@" + os.getenv('MYSQL_HOST') + ":" + os.getenv('MYSQL_PORT', '3306') + "/" + os.getenv('MYSQL_NAME', 'aktienbot')
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning
|
||||
SQLALCHEMY_ENGINE_OPTIONS = {
|
||||
'pool_size': 100,
|
||||
'pool_recycle': 240 # 4 minutes
|
||||
}
|
||||
|
||||
# openapi/Swagger config
|
||||
BASE_RESPONSE_DATA_KEY = "data"
|
||||
BASE_RESPONSE_SCHEMA = BaseResponseSchema
|
||||
|
||||
BOT_EMAIL = os.getenv('BOT_EMAIL')
|
||||
BOT_USERNAME = os.getenv('BOT_USERNAME')
|
||||
BOT_PASSWORD = os.getenv('BOT_PASSWORD')
|
||||
|
||||
ADMIN_EMAIL = os.getenv('ADMIN_EMAIL')
|
||||
ADMIN_USERNAME = os.getenv('ADMIN_USERNAME')
|
||||
ADMIN_PASSWORD = os.getenv('ADMIN_PASSWORD')
|
26
api/app/config/flask_test.cfg
Normal file
26
api/app/config/flask_test.cfg
Normal file
@@ -0,0 +1,26 @@
|
||||
import os
|
||||
from app.schema import BaseResponseSchema
|
||||
|
||||
# Flask settings
|
||||
SECRET_KEY = os.getenv('SECRET_KEY', 'secret string')
|
||||
|
||||
|
||||
# Flask-SQLAlchemy settings
|
||||
SQLALCHEMY_DATABASE_URI = "mysql+pymysql://" + os.getenv('MYSQL_USER') + ":" + os.getenv('MYSQL_PASSWORD') + "@" + os.getenv('MYSQL_HOST') + ":" + os.getenv('MYSQL_PORT', '3306') + "/" + os.getenv('MYSQL_NAME', 'aktienbot_test')
|
||||
SQLALCHEMY_TRACK_MODIFICATIONS = False # Avoids SQLAlchemy warning
|
||||
SQLALCHEMY_ENGINE_OPTIONS = {
|
||||
'pool_size': 100,
|
||||
'pool_recycle': 240 # 4 minutes
|
||||
}
|
||||
|
||||
# openapi/Swagger config
|
||||
BASE_RESPONSE_DATA_KEY = "data"
|
||||
BASE_RESPONSE_SCHEMA = BaseResponseSchema
|
||||
|
||||
BOT_EMAIL = os.getenv('BOT_EMAIL')
|
||||
BOT_USERNAME = os.getenv('BOT_USERNAME')
|
||||
BOT_PASSWORD = os.getenv('BOT_PASSWORD')
|
||||
|
||||
ADMIN_EMAIL = os.getenv('ADMIN_EMAIL')
|
||||
ADMIN_USERNAME = os.getenv('ADMIN_USERNAME')
|
||||
ADMIN_PASSWORD = os.getenv('ADMIN_PASSWORD')
|
Reference in New Issue
Block a user