Skip to content

Commit 6f291bf

Browse files
chore(ci): add the Parser feature to nox tests (#4584)
Adding Parser test
1 parent 4dee5d2 commit 6f291bf

24 files changed

+18
-16
lines changed

noxfile.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def test_with_boto3_sdk_as_required_package(session: nox.Session):
117117

118118
@nox.session()
119119
def test_with_fastjsonschema_as_required_package(session: nox.Session):
120-
"""Tests that depends on boto3/botocore library"""
120+
"""Tests that depends on fastjsonschema library"""
121121
# Validation
122122
build_and_run_test(
123123
session,
@@ -145,14 +145,16 @@ def test_with_aws_encryption_sdk_as_required_package(session: nox.Session):
145145
@nox.session()
146146
@nox.parametrize("pydantic", ["1.10", "2.0"])
147147
def test_with_pydantic_required_package(session: nox.Session, pydantic: str):
148-
"""Tests that only depends for required libraries"""
148+
"""Tests that only depends for Pydantic library v1 and v2"""
149149
# Event Handler OpenAPI
150+
# Parser
150151

151152
session.install(f"pydantic>={pydantic}")
152153

153154
build_and_run_test(
154155
session,
155156
folders=[
156157
f"{PREFIX_TESTS_FUNCTIONAL}/event_handler/_pydantic/",
158+
f"{PREFIX_TESTS_UNIT}/parser/_pydantic/",
157159
],
158160
)

tests/unit/parser/_pydantic/__init__.py

Whitespace-only changes.
File renamed without changes.

tests/unit/parser/test_apigw.py renamed to tests/unit/parser/_pydantic/test_apigw.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from aws_lambda_powertools.utilities.parser import envelopes, parse
55
from aws_lambda_powertools.utilities.parser.models import APIGatewayProxyEventModel
66
from tests.functional.utils import load_event
7-
from tests.unit.parser.schemas import MyApiGatewayBusiness
7+
from tests.unit.parser._pydantic.schemas import MyApiGatewayBusiness
88

99

1010
def test_apigw_event_with_envelope():

tests/unit/parser/test_apigwv2.py renamed to tests/unit/parser/_pydantic/test_apigwv2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
RequestContextV2Authorizer,
66
)
77
from tests.functional.utils import load_event
8-
from tests.unit.parser.schemas import MyApiGatewayBusiness
8+
from tests.unit.parser._pydantic.schemas import MyApiGatewayBusiness
99

1010

1111
def test_apigw_v2_event_with_envelope():

tests/unit/parser/test_bedrock_agent.py renamed to tests/unit/parser/_pydantic/test_bedrock_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from aws_lambda_powertools.utilities.parser import envelopes, parse
22
from aws_lambda_powertools.utilities.parser.models import BedrockAgentEventModel
33
from tests.functional.utils import load_event
4-
from tests.unit.parser.schemas import MyBedrockAgentBusiness
4+
from tests.unit.parser._pydantic.schemas import MyBedrockAgentBusiness
55

66

77
def test_bedrock_agent_event_with_envelope():

tests/unit/parser/test_cloudwatch.py renamed to tests/unit/parser/_pydantic/test_cloudwatch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
CloudWatchLogsModel,
1212
)
1313
from tests.functional.utils import load_event
14-
from tests.unit.parser.schemas import MyCloudWatchBusiness
14+
from tests.unit.parser._pydantic.schemas import MyCloudWatchBusiness
1515

1616

1717
def decode_cloudwatch_raw_event(event: dict):

tests/unit/parser/test_dynamodb.py renamed to tests/unit/parser/_pydantic/test_dynamodb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from aws_lambda_powertools.utilities.parser import ValidationError, envelopes, parse
44
from tests.functional.utils import load_event
5-
from tests.unit.parser.schemas import MyAdvancedDynamoBusiness, MyDynamoBusiness
5+
from tests.unit.parser._pydantic.schemas import MyAdvancedDynamoBusiness, MyDynamoBusiness
66

77

88
def test_dynamo_db_stream_trigger_event():

0 commit comments

Comments
 (0)