We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91fbbe6 commit 7c42592Copy full SHA for 7c42592
api/test_index.py
@@ -1,6 +1,15 @@
1
+import pytest
2
+
3
from index import say_hello, root
4
-def test_root():
- assert root() == {"message": "Hello World"}
5
-def test_say_hello():
6
- assert say_hello("World") == {"message": "Hello World"}
+@pytest.mark.asyncio
7
+async def test_root():
8
+ result = await root()
9
+ assert result == {'message': 'Hello World'}
10
11
12
13
+async def test_say_hello():
14
+ result = await say_hello("John")
15
+ assert result == {'message': 'Hello John'}
0 commit comments