import pytest from htmx_contact import create_app from htmx_contact.config import ContactSettings @pytest.fixture() def test_config(): return ContactSettings(SECRET_KEY=b"secrettestingvalue") @pytest.fixture() def app(test_config): app = create_app(config=test_config) app.config.update( { "TESTING": True, } ) # other setup can go here yield app # clean up / reset resources here @pytest.fixture() def client(app): return app.test_client() @pytest.fixture() def runner(app): return app.test_cli_runner()