Skip to content

Commit f81ad64

Browse files
committed
👷
1 parent 85bc2f5 commit f81ad64

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

src/handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import logging
21
import json
3-
from typing import Dict, Any
2+
import logging
3+
from typing import Any, Dict
44

55
from aws_xray_sdk.core import patch_all, xray_recorder
66

tests/test_handler.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1+
import json
2+
13
from src.handler import lambda_handler
24

35

46
def test_lambda_handler() -> None:
5-
result = lambda_handler(event={}, context={})
6-
assert result == "Hello from Lambda!"
7+
event = {}
8+
context = {}
9+
result = lambda_handler(event, context)
10+
expected = {
11+
"statusCode": 200,
12+
"headers": {"Content-Type": "application/json"},
13+
"body": json.dumps("Hello from lambda"),
14+
}
15+
assert result == expected

0 commit comments

Comments
 (0)