Completed
Push — master ( b6f8ef...f3cde1 )
by Jochen
16:59
created

conftest.app()   A

Complexity

Conditions 2

Size

Total Lines 5
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 5
nop 2
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
"""
2
:Copyright: 2006-2019 Jochen Kupperschmidt
3
:License: Modified BSD, see LICENSE for details.
4
5
Fixtures specific to admin blueprints
6
"""
7
8
import pytest
9
10
from tests.base import CONFIG_FILENAME_TEST_ADMIN, create_app
11
from tests.conftest import database_recreated
12
13
14
@pytest.fixture(scope='session')
15
def admin_app_without_db(db):
16
    app = create_app(CONFIG_FILENAME_TEST_ADMIN)
17
    with app.app_context():
18
        yield app
19
20
21
@pytest.fixture(scope='module')
22
def app(admin_app_without_db, db):
23
    app = admin_app_without_db
24
    with database_recreated(db):
25
        yield app
26