conftest.py 222 Bytes
Newer Older
Rob Carleski's avatar
Rob Carleski committed
1
2
3
4
5
6
7
8
9
10
11
12
import flask
import os
import pytest
import subprocess


@pytest.fixture(scope="session")
def mock_mcomm():
    os.environ["FLASK_APP"] = 'mock_mcomm.py'
    p = subprocess.Popen(['flask', 'run'])
    yield p
    p.kill()