Skip to content

Commit ecf8c25

Browse files
committed
test pytest config
1 parent a9127e0 commit ecf8c25

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/test_config.py

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import pytest
2+
3+
from quartapp import create_app
4+
5+
6+
def test_config():
7+
assert not create_app().testing
8+
assert create_app({"TESTING": True}).testing
9+
10+
11+
@pytest.mark.asyncio
12+
async def test_hello(client):
13+
response = await client.get("/hello")
14+
data = await response.get_json()
15+
16+
assert response.status_code == 200
17+
assert "Hello, World!" in data["answer"]

0 commit comments

Comments
 (0)