File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -297,11 +297,11 @@ your text fixtures into the structures, and call your handler directly:
297
297
#[test]
298
298
fn test_my_lambda_handler() {
299
299
let input = serde_json::from_str("{\"command\": \"Say Hi!\"}").expect("failed to parse event");
300
- let context = lambda_runtime::types:: Context::default();
300
+ let context = lambda_runtime::Context::default();
301
301
302
- let event = lambda_runtime::types:: LambdaEvent::new(input, context);
302
+ let event = lambda_runtime::LambdaEvent::new(input, context);
303
303
304
- my_lambda_handler(event).expect("failed to handle event");
304
+ my_lambda_handler(event).await. expect("failed to handle event");
305
305
}
306
306
```
307
307
@@ -316,7 +316,7 @@ fn test_my_lambda_handler() {
316
316
let request = lambda_http::request::from_str(input)
317
317
.expect("failed to create request");
318
318
319
- let response = my_lambda_handler(request).expect("failed to handle request");
319
+ let response = my_lambda_handler(request).await. expect("failed to handle request");
320
320
}
321
321
```
322
322
You can’t perform that action at this time.
0 commit comments