import os import sys import application import pytest tests_dir = os.path.abspath(__file__) # Add the project root dir to the path so that module imports work in tests sys.path.insert(1, os.path.abspath(os.path.join(tests_dir, '..'))) @pytest.fixture def client(): """Return flask test client. Returns: flask client: flask test client """ return application.app.test_client()