How to always provide a context for Flask app tested with PyTest?

Solution
import pytest
from flask import Flask


@pytest.fixture
def app():
    app = Flask(__name__)
    return app
import pytest
from flask import current_app, Flask

from main import main, some_method

def test_some_method(app):
    #with app.app_context():
        # calling and doing some assertion
    some_method()