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

conftest   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 26
rs 10
c 0
b 0
f 0
wmc 4

2 Functions

Rating   Name   Duplication   Size   Complexity  
A admin_app_without_db() 0 5 2
A app() 0 5 2
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