Skip to content

Commit 7c42592

Browse files
committed
fix: dix test
1 parent 91fbbe6 commit 7c42592

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

api/test_index.py

+13-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
import pytest
2+
13
from index import say_hello, root
24

3-
def test_root():
4-
assert root() == {"message": "Hello World"}
5-
def test_say_hello():
6-
assert say_hello("World") == {"message": "Hello World"}
5+
6+
@pytest.mark.asyncio
7+
async def test_root():
8+
result = await root()
9+
assert result == {'message': 'Hello World'}
10+
11+
12+
@pytest.mark.asyncio
13+
async def test_say_hello():
14+
result = await say_hello("John")
15+
assert result == {'message': 'Hello John'}

0 commit comments

Comments
 (0)