blob: 561052d2f59828f13046b14d1660bc9f74d15a59 [file] [log] [blame]
TRM-codingbe1a6192025-06-11 22:18:02 +08001import pytest
2from app import create_app
3
4@pytest.fixture
5def client():
6 app = create_app()
7 app.config['TESTING'] = True
8 return app.test_client()
9
10def test_index(client):
11 rv = client.get('/')
12 assert rv.status_code == 200
13 json_data = rv.get_json()
14 assert json_data['message'] == 'Hello, Flask!'