コード例 #1
0
def frontend_app():
    """Set up global front-end app for functional tests

    Initialized once per test-run
    """
    app = create_frontend_app(config.TESTING_CONF_PATH)
    with app.app_context():
        setup_app(app)
        setup_db()
        yield app
        teardown_db()
コード例 #2
0
ファイル: conftest.py プロジェクト: JorisLA/caisse-noire-back
def db(app):
    """Creates clean database schema and drops it on teardown

    Note, that this is a session scoped fixture, it will be executed only once
    and shared among all tests. Use `db_session` fixture to get clean database
    before each test.
    """

    setup_db(app)
    yield database.db
    teardown_db()
コード例 #3
0
def db_schema(app):
    """Creates clean database schema and drops it on teardown

    Note, that this is a session scoped fixture, it will be executed only once
    and shared among all tests. Use `db` fixture to get clean database before
    each test.
    """
    with app.app_context():
        setup_db()
        yield model.db.session
        teardown_db()
コード例 #4
0
def database(application):
    """Creates clean database schema and drops it on teardown

    Note, that this is a session scoped fixture, it will be executed only once
    and shared among all tests. Use `db` fixture to get clean database before
    each test.
    """
    assert isinstance(application, App)

    setup_db(application)
    yield db
    teardown_db()
コード例 #5
0
ファイル: conftest.py プロジェクト: RBE-Avionik/skylines
def db(app):
    """Creates clean database schema and drops it on teardown

    Note, that this is a session scoped fixture, it will be executed only once
    and shared among all tests. Use `db_session` fixture to get clean database
    before each test.
    """
    assert isinstance(app, SkyLines)

    setup_db(app)
    yield database.db
    teardown_db()
コード例 #6
0
ファイル: test_sql.py プロジェクト: imclab/skylines
def setup():
    # Setup the database
    setup_db()
    db.session.add(TestTable(name='John Doe', uni='Jane and John Doe'))
    db.session.commit()
コード例 #7
0
 def setup_method(self):
     tests.setup_db()
コード例 #8
0
def db(app):
    """Creates clean database schema and drops it on teardown"""
    assert isinstance(app, URLShortenerApp)
    setup_db(app)
    yield database.db
    teardown_db()
コード例 #9
0
 def setUp(self):
     setup_db(self)
コード例 #10
0
def setup_db():
	global dbmanager
	tests.setup_db()
	dbmanager = tests.dbmanager
	qbicpwresetd.db_manager = tests.dbmanager
コード例 #11
0
def setup():
    """Function called by nose on module load"""
    setup_db()
コード例 #12
0
def setup_db():
	global dbmanager
	tests.setup_db()
	dbmanager = tests.dbmanager