summaryrefslogtreecommitdiff
path: root/conftest.py
blob: 1e404c1cabce3f26c6afb7218409e2e6dc5bb6cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import pytest

from main import FLASK_CORE_APP


@pytest.fixture
def client(mocker):
    """Returns a Flask API client to interact with."""
    FLASK_CORE_APP.config['TESTING'] = True
    mocker.patch('opendc.util.database.DB')

    with FLASK_CORE_APP.test_client() as client:
        yield client