Skip to content

Commit 814ef50

Browse files
committed
refactor: rename response_validation_error_http_status to response_validation_error_http_code
1 parent f6f0407 commit 814ef50

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/unit/event_handler/test_response_validation.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
app = APIGatewayRestResolver(enable_validation=True)
1212
app_with_custom_response_validation_error = APIGatewayRestResolver(
1313
enable_validation=True,
14-
response_validation_error_http_status=HTTPStatus.INTERNAL_SERVER_ERROR,
14+
response_validation_error_http_code=HTTPStatus.INTERNAL_SERVER_ERROR,
1515
)
1616

1717

@@ -182,22 +182,22 @@ def handle_response_validation_error(ex: ResponseValidationError):
182182

183183
def test_incorrect_resolver_config_no_validation(self):
184184
with pytest.raises(ValueError) as exception_info:
185-
APIGatewayRestResolver(response_validation_error_http_status=500)
185+
APIGatewayRestResolver(response_validation_error_http_code=500)
186186

187187
assert (
188188
str(exception_info.value)
189-
== "'response_validation_error_http_status' cannot be set when enable_validation is False."
189+
== "'response_validation_error_http_code' cannot be set when enable_validation is False."
190190
)
191191

192-
@pytest.mark.parametrize("response_validation_error_http_status", [(20), ("hi"), (1.21)])
193-
def test_incorrect_resolver_config_bad_http_status_code(self, response_validation_error_http_status):
192+
@pytest.mark.parametrize("response_validation_error_http_code", [(20), ("hi"), (1.21)])
193+
def test_incorrect_resolver_config_bad_http_status_code(self, response_validation_error_http_code):
194194
with pytest.raises(ValueError) as exception_info:
195195
APIGatewayRestResolver(
196196
enable_validation=True,
197-
response_validation_error_http_status=response_validation_error_http_status,
197+
response_validation_error_http_code=response_validation_error_http_code,
198198
)
199199

200200
assert (
201201
str(exception_info.value)
202-
== f"'{response_validation_error_http_status}' must be an integer representing an HTTP status code."
202+
== f"'{response_validation_error_http_code}' must be an integer representing an HTTP status code."
203203
)

0 commit comments

Comments
 (0)