DocsGPT/tests/test_app.py

24 lines
869 B
Python
Raw Normal View History

2023-09-27 16:54:57 +00:00
from flask import Flask
2023-09-27 16:54:57 +00:00
from application.api.answer.routes import answer
from application.api.internal.routes import internal
from application.api.user.routes import user
from application.core.settings import settings
2023-09-27 16:54:57 +00:00
def test_app_config():
app = Flask(__name__)
app.register_blueprint(user)
app.register_blueprint(answer)
app.register_blueprint(internal)
2023-09-27 17:04:07 +00:00
app.config["UPLOAD_FOLDER"] = "inputs"
2023-09-27 16:54:57 +00:00
app.config["CELERY_BROKER_URL"] = settings.CELERY_BROKER_URL
app.config["CELERY_RESULT_BACKEND"] = settings.CELERY_RESULT_BACKEND
app.config["MONGO_URI"] = settings.MONGO_URI
2023-09-27 16:54:57 +00:00
assert app.config["UPLOAD_FOLDER"] == "inputs"
assert app.config["CELERY_BROKER_URL"] == settings.CELERY_BROKER_URL
assert app.config["CELERY_RESULT_BACKEND"] == settings.CELERY_RESULT_BACKEND
assert app.config["MONGO_URI"] == settings.MONGO_URI