Exemple #1
0
 def setUpClass(cls):
     cls.client = app.test_client()
     with app.app_context():
         init_db()
         update_db()
         settings.TESTING = True
         skf.app.initialize_app(app)
Exemple #2
0
 def setUpClass(cls):
     cls.client = app.test_client()
     with app.app_context():
         init_db()
         update_db()
         settings.TESTING = True
         skf.app.initialize_app(app)
Exemple #3
0
def create_app():
    flask_app = Flask(__name__)
    configure_app(flask_app)
    initialize_app(flask_app)
    db.init_app(flask_app)
    with flask_app.app_context():
        init_db()
    return flask_app
Exemple #4
0
 def setUpClass(cls):
     cls.client = app.test_client()
     with app.app_context():
         update_db()
         init_db()
         chatbot_tools.init_dataset()
         settings.TESTING = True
     app.app_context().push()
Exemple #5
0
 def setUp(self):
     self.client = app.test_client()
     with app.app_context():
         init_db(True)
         settings.TESTING = True
     self.driver = webdriver.Chrome()
     driver = self.driver
     driver.get("http://localhost:4200/")
     username = driver.find_element_by_name("username")
     password = driver.find_element_by_name("password")
     username.send_keys("admin")
     password.send_keys("admin")
     password.send_keys(Keys.RETURN)
Exemple #6
0
 def test_init_db(self):
     """Test if the init db is working"""
     self.assertTrue(init_db())
Exemple #7
0
def initdb_command():
    """Creates the database with all the Markdown files."""
    init_db()
    print('Initialized the database.')
Exemple #8
0
def initdb_command():
    """Delete DB and creates a new database with all the Markdown files."""
    init_db()
    log.info("Created the database.")