Exemplo n.º 1
0
    def setUp(self):
        # Redirect SQLA to the test database.
        sqla._db_eng = create_engine("sqlite:///test_database.db")
        Base.metadata.create_all(sqla._db_eng)
        sqla.db = sessionmaker(sqla._db_eng)

        # Flask too.
        app.config["DATABASE_URI"] = "sqlite:///test_database.db"

        self.flask_app = app.test_client()
Exemplo n.º 2
0
    def setUp(self):
        # Redirect SQLA to the test database.
        sqla._db_eng = create_engine("sqlite:///test_database.db")
        Base.metadata.create_all(sqla._db_eng)
        sqla.db = sessionmaker(sqla._db_eng)

        # Flask too.
        app.config["DATABASE_URI"] = "sqlite:///test_database.db"

        self.flask_app = app.test_client()
Exemplo n.º 3
0
 def setUp(self):
     self.flask_app = app.test_client()