Total Complexity | 4 |
Total Lines | 26 |
Duplicated Lines | 0 % |
Changes | 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 |