Passed
Push — master ( 3b1942...f86722 )
by Jace
01:33
created

public_client()   A

Complexity

Conditions 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 8
rs 10
c 1
b 0
f 0
cc 1
1
"""Integration tests configuration file."""
2
3
import pytest
0 ignored issues
show
introduced by
Unable to import 'pytest'
Loading history...
4
5
from memegen.factory import create_app
0 ignored issues
show
Bug introduced by
The name factory does not seem to exist in module memegen.
Loading history...
introduced by
Unable to import 'memegen.factory'
Loading history...
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