1 | """Integration tests configuration file.""" |
||
2 | |||
3 | import pytest |
||
0 ignored issues
–
show
introduced
by
![]() |
|||
4 | |||
5 | from memegen.factory import create_app |
||
6 | from memegen.settings import get_config |
||
7 | |||
8 | from memegen.tests.conftest import pytest_configure # pylint: disable=unused-import |
||
9 | |||
10 | |||
11 | @pytest.yield_fixture(scope='session') |
||
12 | def app(): |
||
13 | yield create_app(get_config('test')) |
||
14 | |||
15 | |||
16 | @pytest.yield_fixture |
||
17 | def client(app): # pylint: disable=redefined-outer-name |
||
18 | yield app.test_client() |
||
19 | |||
20 | |||
21 | @pytest.yield_fixture |
||
22 | def public_client(app): # pylint: disable=redefined-outer-name |
||
23 | backup = app.config['WATERMARK_OPTIONS'] |
||
24 | app.config['WATERMARK_OPTIONS'] = ['memegen.link'] |
||
25 | |||
26 | yield app.test_client() |
||
27 | |||
28 | app.config['WATERMARK_OPTIONS'] = backup |
||
29 |