Beispiel #1
0
def test_development_config():
    app = create_app()
    app.config.from_object('chatbot.config.DevelopmentConfig')

    assert app.config['SECRET_KEY'] == 'dev'
    assert current_app is not None
    assert not app.config['TESTING']
Beispiel #2
0
def test_production_config():
    app = create_app()
    app.config.from_object('chatbot.config.ProductionConfig')

    assert app.config['SECRET_KEY'] == 'prod'
    assert not app.config['TESTING']
    assert app.config['LANGUAGE_CODE'] == 'ko-KR'
Beispiel #3
0
def app():
    # setUp
    app = create_app()
    app.config.from_object('chatbot.config.TestingConfig')

    yield app

    # tearDown
    pass
def chatbot_start():
    from chatbot import create_app
    app = create_app()
    app.run()
Beispiel #5
0
from flask.cli import FlaskGroup
from dotenv import load_dotenv

from chatbot import create_app

load_dotenv()
app = create_app()
cli = FlaskGroup(app)

if __name__ == '__main__':
    cli()
Beispiel #6
0
def test_config():
    assert not create_app().testing
Beispiel #7
0
def test_testing_config():
    app = create_app()
    app.config.from_object('chatbot.config.TestingConfig')

    assert app.config['SECRET_KEY'] == 'test'