File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
tests/functional/event_handler Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -145,14 +145,14 @@ def handler() -> Decimal:
145
145
# THEN the body must be a decimal as int
146
146
result = app (LOAD_GW_EVENT , {})
147
147
assert result ["statusCode" ] == 200
148
- assert result ["body" ] == sample_decimal
148
+ assert result ["body" ] == "10"
149
149
150
150
151
151
def test_validate_return_decimal_as_float ():
152
152
# GIVEN an APIGatewayRestResolver with validation enabled
153
153
app = APIGatewayRestResolver (enable_validation = True )
154
154
155
- sample_decimal = Decimal (10.20 )
155
+ sample_decimal = Decimal (10.22 )
156
156
157
157
# WHEN a handler is defined with a return type as Decimal
158
158
@app .get ("/" )
@@ -165,7 +165,7 @@ def handler() -> Decimal:
165
165
# THEN the body must be a decimal as float
166
166
result = app (LOAD_GW_EVENT , {})
167
167
assert result ["statusCode" ] == 200
168
- assert result ["body" ] == sample_decimal
168
+ assert result ["body" ] == "10.22"
169
169
170
170
171
171
def test_validate_return_purepath ():
You can’t perform that action at this time.
0 commit comments