import pytest from web import app @pytest.fixture def client(): app.app.config['TESTING'] = True client = app.app.test_client() yield client def test_root_page(client): rv = client.get('/') assert b'Hello World!' in rv.data