Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7b10885

Browse files
committedMar 3, 2025··
Type LambdaContext types in tests
1 parent 53f4a0e commit 7b10885

17 files changed

+186
-169
lines changed
 

‎examples/batch_processing/src/getting_started_with_test.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ def load_event(path: Path):
1111
return json.load(f)
1212

1313

14-
@pytest.fixture
15-
def lambda_context():
16-
@dataclass
17-
class LambdaContext:
18-
function_name: str = "test"
19-
memory_limit_in_mb: int = 128
20-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
21-
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
14+
@dataclass
15+
class LambdaContext:
16+
function_name: str = "test"
17+
memory_limit_in_mb: int = 128
18+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
19+
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
20+
2221

22+
@pytest.fixture
23+
def lambda_context() -> LambdaContext:
2324
return LambdaContext()
2425

2526

@@ -29,7 +30,7 @@ def sqs_event():
2930
return load_event(path=Path("events/sqs_event.json"))
3031

3132

32-
def test_app_batch_partial_response(sqs_event, lambda_context):
33+
def test_app_batch_partial_response(sqs_event, lambda_context: LambdaContext):
3334
# GIVEN
3435
processor_result = processor # access processor for additional assertions
3536
successful_record = sqs_event["Records"][0]

‎examples/data_masking/tests/test_lambda_mask.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44
import test_lambda_mask
55

66

7-
@pytest.fixture
8-
def lambda_context():
9-
@dataclass
10-
class LambdaContext:
11-
function_name: str = "test"
12-
memory_limit_in_mb: int = 128
13-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:111111111:function:test"
14-
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
7+
@dataclass
8+
class LambdaContext:
9+
function_name: str = "test"
10+
memory_limit_in_mb: int = 128
11+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:111111111:function:test"
12+
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
13+
14+
def get_remaining_time_in_millis(self) -> int:
15+
return 5
1516

16-
def get_remaining_time_in_millis(self) -> int:
17-
return 5
1817

18+
@pytest.fixture
19+
def lambda_context() -> LambdaContext:
1920
return LambdaContext()
2021

2122

22-
def test_encrypt_lambda(lambda_context):
23+
def test_encrypt_lambda(lambda_context: LambdaContext):
2324
# GIVEN: A sample event for testing
2425
event = {"testkey": "testvalue"}
2526

‎examples/event_handler_bedrock_agents/src/assert_bedrock_agent_response.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
import pytest
55

66

7-
@pytest.fixture
8-
def lambda_context():
9-
@dataclass
10-
class LambdaContext:
11-
function_name: str = "test"
12-
memory_limit_in_mb: int = 128
13-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
14-
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
7+
@dataclass
8+
class LambdaContext:
9+
function_name: str = "test"
10+
memory_limit_in_mb: int = 128
11+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
12+
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
13+
1514

15+
@pytest.fixture
16+
def lambda_context() -> LambdaContext:
1617
return LambdaContext()
1718

1819

19-
def test_lambda_handler(lambda_context):
20+
def test_lambda_handler(lambda_context: LambdaContext):
2021
minimal_event = {
2122
"apiPath": "/current_time",
2223
"httpMethod": "GET",

‎examples/event_handler_graphql/src/assert_async_graphql_response.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,21 @@
1010
)
1111

1212

13-
@pytest.fixture
14-
def lambda_context():
15-
@dataclass
16-
class LambdaContext:
17-
function_name: str = "test"
18-
memory_limit_in_mb: int = 128
19-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
20-
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
13+
@dataclass
14+
class LambdaContext:
15+
function_name: str = "test"
16+
memory_limit_in_mb: int = 128
17+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
18+
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
19+
2120

21+
@pytest.fixture
22+
def lambda_context() -> LambdaContext:
2223
return LambdaContext()
2324

2425

2526
@pytest.mark.asyncio
26-
async def test_async_direct_resolver(lambda_context):
27+
async def test_async_direct_resolver(lambda_context: LambdaContext):
2728
# GIVEN
2829
fake_event = json.loads(Path("assert_async_graphql_response.json").read_text())
2930

‎examples/event_handler_graphql/src/assert_graphql_response.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@
88
from assert_graphql_response_module import Location, app # instance of AppSyncResolver
99

1010

11-
@pytest.fixture
12-
def lambda_context():
13-
@dataclass
14-
class LambdaContext:
15-
function_name: str = "test"
16-
memory_limit_in_mb: int = 128
17-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
18-
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
11+
@dataclass
12+
class LambdaContext:
13+
function_name: str = "test"
14+
memory_limit_in_mb: int = 128
15+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
16+
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
17+
1918

19+
@pytest.fixture
20+
def lambda_context() -> LambdaContext:
2021
return LambdaContext()
2122

2223

23-
def test_direct_resolver(lambda_context):
24+
def test_direct_resolver(lambda_context: LambdaContext):
2425
# GIVEN
2526
fake_event = json.loads(Path("assert_graphql_response.json").read_text())
2627

‎examples/event_handler_rest/src/assert_alb_api_resolver_response.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
import pytest
55

66

7-
@pytest.fixture
8-
def lambda_context():
9-
@dataclass
10-
class LambdaContext:
11-
function_name: str = "test"
12-
memory_limit_in_mb: int = 128
13-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
14-
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
7+
@dataclass
8+
class LambdaContext:
9+
function_name: str = "test"
10+
memory_limit_in_mb: int = 128
11+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
12+
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
13+
1514

15+
@pytest.fixture
16+
def lambda_context() -> LambdaContext:
1617
return LambdaContext()
1718

1819

19-
def test_lambda_handler(lambda_context):
20+
def test_lambda_handler(lambda_context: LambdaContext):
2021
minimal_event = {
2122
"path": "/todos",
2223
"httpMethod": "GET",

‎examples/event_handler_rest/src/assert_function_url_api_resolver_response.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
import pytest
55

66

7-
@pytest.fixture
8-
def lambda_context():
9-
@dataclass
10-
class LambdaContext:
11-
function_name: str = "test"
12-
memory_limit_in_mb: int = 128
13-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
14-
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
7+
@dataclass
8+
class LambdaContext:
9+
function_name: str = "test"
10+
memory_limit_in_mb: int = 128
11+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
12+
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
13+
1514

15+
@pytest.fixture
16+
def lambda_context() -> LambdaContext:
1617
return LambdaContext()
1718

1819

19-
def test_lambda_handler(lambda_context):
20+
def test_lambda_handler(lambda_context: LambdaContext):
2021
minimal_event = {
2122
"rawPath": "/todos",
2223
"requestContext": {

‎examples/event_handler_rest/src/assert_http_api_resolver_response.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
import pytest
55

66

7-
@pytest.fixture
8-
def lambda_context():
9-
@dataclass
10-
class LambdaContext:
11-
function_name: str = "test"
12-
memory_limit_in_mb: int = 128
13-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
14-
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
7+
@dataclass
8+
class LambdaContext:
9+
function_name: str = "test"
10+
memory_limit_in_mb: int = 128
11+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
12+
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
13+
1514

15+
@pytest.fixture
16+
def lambda_context() -> LambdaContext:
1617
return LambdaContext()
1718

1819

19-
def test_lambda_handler(lambda_context):
20+
def test_lambda_handler(lambda_context: LambdaContext):
2021
minimal_event = {
2122
"rawPath": "/todos",
2223
"requestContext": {

‎examples/event_handler_rest/src/assert_rest_api_resolver_response.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,20 @@
44
import pytest
55

66

7-
@pytest.fixture
8-
def lambda_context():
9-
@dataclass
10-
class LambdaContext:
11-
function_name: str = "test"
12-
memory_limit_in_mb: int = 128
13-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
14-
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
7+
@dataclass
8+
class LambdaContext:
9+
function_name: str = "test"
10+
memory_limit_in_mb: int = 128
11+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:123456789012:function:test"
12+
aws_request_id: str = "da658bd3-2d6f-4e7b-8ec2-937234644fdc"
13+
1514

15+
@pytest.fixture
16+
def lambda_context() -> LambdaContext:
1617
return LambdaContext()
1718

1819

19-
def test_lambda_handler(lambda_context):
20+
def test_lambda_handler(lambda_context: LambdaContext):
2021
minimal_event = {
2122
"path": "/todos",
2223
"httpMethod": "GET",

‎examples/idempotency/tests/test_disabling_idempotency_utility.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,23 @@
44
import pytest
55

66

7-
@pytest.fixture
8-
def lambda_context():
9-
@dataclass
10-
class LambdaContext:
11-
function_name: str = "test"
12-
memory_limit_in_mb: int = 128
13-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
14-
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
7+
@dataclass
8+
class LambdaContext:
9+
function_name: str = "test"
10+
memory_limit_in_mb: int = 128
11+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
12+
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
13+
14+
def get_remaining_time_in_millis(self) -> int:
15+
return 5
1516

16-
def get_remaining_time_in_millis(self) -> int:
17-
return 5
1817

18+
@pytest.fixture
19+
def lambda_context() -> LambdaContext:
1920
return LambdaContext()
2021

2122

22-
def test_idempotent_lambda_handler(monkeypatch, lambda_context):
23+
def test_idempotent_lambda_handler(monkeypatch, lambda_context: LambdaContext):
2324
# Set POWERTOOLS_IDEMPOTENCY_DISABLED before calling decorated functions
2425
monkeypatch.setenv("POWERTOOLS_IDEMPOTENCY_DISABLED", 1)
2526

‎examples/idempotency/tests/test_with_dynamodb_local.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@
55
import pytest
66

77

8-
@pytest.fixture
9-
def lambda_context():
10-
@dataclass
11-
class LambdaContext:
12-
function_name: str = "test"
13-
memory_limit_in_mb: int = 128
14-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
15-
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
8+
@dataclass
9+
class LambdaContext:
10+
function_name: str = "test"
11+
memory_limit_in_mb: int = 128
12+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
13+
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
14+
15+
def get_remaining_time_in_millis(self) -> int:
16+
return 5
1617

17-
def get_remaining_time_in_millis(self) -> int:
18-
return 5
1918

19+
@pytest.fixture
20+
def lambda_context() -> LambdaContext:
2021
return LambdaContext()
2122

2223

23-
def test_idempotent_lambda(lambda_context):
24+
def test_idempotent_lambda(lambda_context: LambdaContext):
2425
# Configure the boto3 to use the endpoint for the DynamoDB Local instance
2526
dynamodb_local_client = boto3.client("dynamodb", endpoint_url="http://localhost:8000")
2627
app_test_dynamodb_local.persistence_layer.client = dynamodb_local_client

‎examples/idempotency/tests/test_with_io_operations.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,23 @@
55
import pytest
66

77

8-
@pytest.fixture
9-
def lambda_context():
10-
@dataclass
11-
class LambdaContext:
12-
function_name: str = "test"
13-
memory_limit_in_mb: int = 128
14-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
15-
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
8+
@dataclass
9+
class LambdaContext:
10+
function_name: str = "test"
11+
memory_limit_in_mb: int = 128
12+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
13+
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
14+
15+
def get_remaining_time_in_millis(self) -> int:
16+
return 5
1617

17-
def get_remaining_time_in_millis(self) -> int:
18-
return 5
1918

19+
@pytest.fixture
20+
def lambda_context() -> LambdaContext:
2021
return LambdaContext()
2122

2223

23-
def test_idempotent_lambda(lambda_context):
24+
def test_idempotent_lambda(lambda_context: LambdaContext):
2425
mock_client = MagicMock()
2526
app_test_io_operations.persistence_layer.client = mock_client
2627
result = app_test_io_operations.handler({"testkey": "testvalue"}, lambda_context)

‎examples/logger/src/fake_lambda_context_for_logger.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,19 @@
44
import pytest
55

66

7-
@pytest.fixture
8-
def lambda_context():
9-
@dataclass
10-
class LambdaContext:
11-
function_name: str = "test"
12-
memory_limit_in_mb: int = 128
13-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
14-
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
7+
@dataclass
8+
class LambdaContext:
9+
function_name: str = "test"
10+
memory_limit_in_mb: int = 128
11+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
12+
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
13+
1514

15+
@pytest.fixture
16+
def lambda_context() -> LambdaContext:
1617
return LambdaContext()
1718

1819

19-
def test_lambda_handler(lambda_context):
20+
def test_lambda_handler(lambda_context: LambdaContext):
2021
test_event = {"test": "event"}
2122
fake_lambda_context_for_logger_module.handler(test_event, lambda_context)

‎examples/metrics/src/assert_multiple_emf_blobs.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,24 @@
55
import pytest
66

77

8-
@pytest.fixture
9-
def lambda_context():
10-
@dataclass
11-
class LambdaContext:
12-
function_name: str = "test"
13-
memory_limit_in_mb: int = 128
14-
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
15-
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
8+
@dataclass
9+
class LambdaContext:
10+
function_name: str = "test"
11+
memory_limit_in_mb: int = 128
12+
invoked_function_arn: str = "arn:aws:lambda:eu-west-1:809313241:function:test"
13+
aws_request_id: str = "52fdfc07-2182-154f-163f-5f0f9a621d72"
14+
1615

16+
@pytest.fixture
17+
def lambda_context() -> LambdaContext:
1718
return LambdaContext()
1819

1920

2021
def capture_metrics_output_multiple_emf_objects(capsys):
2122
return [json.loads(line.strip()) for line in capsys.readouterr().out.split("\n") if line]
2223

2324

24-
def test_log_metrics(capsys, lambda_context):
25+
def test_log_metrics(capsys, lambda_context: LambdaContext):
2526
assert_multiple_emf_blobs_module.lambda_handler({}, lambda_context)
2627

2728
cold_start_blob, custom_metrics_blob = capture_metrics_output_multiple_emf_objects(capsys)

‎tests/functional/idempotency/_boto3/conftest.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,19 @@ def lambda_apigw_event():
2929
return load_event("apiGatewayProxyV2Event.json")
3030

3131

32-
@pytest.fixture
33-
def lambda_context():
34-
class LambdaContext:
35-
def __init__(self):
36-
self.function_name = "test-func"
37-
self.memory_limit_in_mb = 128
38-
self.invoked_function_arn = "arn:aws:lambda:eu-west-1:809313241234:function:test-func"
39-
self.aws_request_id = "52fdfc07-2182-154f-163f-5f0f9a621d72"
32+
class LambdaContext:
33+
def __init__(self):
34+
self.function_name = "test-func"
35+
self.memory_limit_in_mb = 128
36+
self.invoked_function_arn = "arn:aws:lambda:eu-west-1:809313241234:function:test-func"
37+
self.aws_request_id = "52fdfc07-2182-154f-163f-5f0f9a621d72"
38+
39+
def get_remaining_time_in_millis(self) -> int:
40+
return 1000
4041

41-
def get_remaining_time_in_millis(self) -> int:
42-
return 1000
4342

43+
@pytest.fixture
44+
def lambda_context() -> LambdaContext:
4445
return LambdaContext()
4546

4647

‎tests/functional/idempotency/_redis/test_redis_layer.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,19 @@
3333
redis_badhost = "badhost"
3434

3535

36-
@pytest.fixture
37-
def lambda_context():
38-
class LambdaContext:
39-
def __init__(self):
40-
self.function_name = "test-func"
41-
self.memory_limit_in_mb = 128
42-
self.invoked_function_arn = "arn:aws:lambda:eu-west-1:809313241234:function:test-func"
43-
self.aws_request_id = "52fdfc07-2182-154f-163f-5f0f9a621d72"
36+
class LambdaContext:
37+
def __init__(self):
38+
self.function_name = "test-func"
39+
self.memory_limit_in_mb = 128
40+
self.invoked_function_arn = "arn:aws:lambda:eu-west-1:809313241234:function:test-func"
41+
self.aws_request_id = "52fdfc07-2182-154f-163f-5f0f9a621d72"
42+
43+
def get_remaining_time_in_millis(self) -> int:
44+
return 1000
4445

45-
def get_remaining_time_in_millis(self) -> int:
46-
return 1000
4746

47+
@pytest.fixture
48+
def lambda_context() -> LambdaContext:
4849
return LambdaContext()
4950

5051

‎tests/integration/idempotency/test_idempotency_redis.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,24 +25,25 @@ def redis_container_image():
2525
return "public.ecr.aws/docker/library/redis:7.2-alpine"
2626

2727

28-
@pytest.fixture
29-
def lambda_context():
30-
class LambdaContext:
31-
def __init__(self):
32-
self.function_name = "test-func"
33-
self.memory_limit_in_mb = 128
34-
self.invoked_function_arn = "arn:aws:lambda:eu-west-1:809313241234:function:test-func"
35-
self.aws_request_id = "52fdfc07-2182-154f-163f-5f0f9a621d72"
28+
class LambdaContext:
29+
def __init__(self):
30+
self.function_name = "test-func"
31+
self.memory_limit_in_mb = 128
32+
self.invoked_function_arn = "arn:aws:lambda:eu-west-1:809313241234:function:test-func"
33+
self.aws_request_id = "52fdfc07-2182-154f-163f-5f0f9a621d72"
34+
35+
def get_remaining_time_in_millis(self) -> int:
36+
return 1000
3637

37-
def get_remaining_time_in_millis(self) -> int:
38-
return 1000
3938

39+
@pytest.fixture
40+
def lambda_context() -> LambdaContext:
4041
return LambdaContext()
4142

4243

4344
# test basic
4445
def test_idempotent_function_and_lambda_handler_redis_basic(
45-
lambda_context,
46+
lambda_context: LambdaContext,
4647
redis_container_image,
4748
):
4849
with RedisContainer(image=redis_container_image) as redis_container:
@@ -69,7 +70,7 @@ def lambda_handler(event, context):
6970

7071

7172
def test_idempotent_function_and_lambda_handler_redis_cache(
72-
lambda_context,
73+
lambda_context: LambdaContext,
7374
redis_container_image,
7475
):
7576
with RedisContainer(image=redis_container_image) as redis_container:
@@ -114,7 +115,7 @@ def lambda_handler(event, context):
114115

115116
# test idem-inprogress
116117
def test_idempotent_lambda_redis_in_progress(
117-
lambda_context,
118+
lambda_context: LambdaContext,
118119
redis_container_image,
119120
):
120121
"""
@@ -146,7 +147,7 @@ def lambda_handler(event, context):
146147

147148
# test -remove
148149
def test_idempotent_lambda_redis_delete(
149-
lambda_context,
150+
lambda_context: LambdaContext,
150151
redis_container_image,
151152
):
152153
with RedisContainer(image=redis_container_image) as redis_container:
@@ -175,7 +176,7 @@ def lambda_handler(event, context):
175176
assert handler_result2 == result
176177

177178

178-
def test_idempotent_lambda_redis_credential(lambda_context, redis_container_image):
179+
def test_idempotent_lambda_redis_credential(lambda_context: LambdaContext, redis_container_image):
179180
with RedisContainer(image=redis_container_image) as redis_container:
180181
redis_client = redis_container.get_client()
181182

0 commit comments

Comments
 (0)
Please sign in to comment.