We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85bc2f5 commit f81ad64Copy full SHA for f81ad64
src/handler.py
@@ -1,6 +1,6 @@
1
-import logging
2
import json
3
-from typing import Dict, Any
+import logging
+from typing import Any, Dict
4
5
from aws_xray_sdk.core import patch_all, xray_recorder
6
tests/test_handler.py
@@ -1,6 +1,15 @@
+import json
+
from src.handler import lambda_handler
def test_lambda_handler() -> None:
- result = lambda_handler(event={}, context={})
- 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