Skip to content

Commit

Permalink
Unit Test: Add Validation Error Message assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
PSNAppz committed Jun 19, 2024
1 parent 1abdd64 commit b1d45b5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/test_async_mapper_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ async def test_link_async_invalid_signature(
correlation_id="error_correlation_id",
timestamp=datetime.utcnow().isoformat(),
ack_status="NACK",
error={
"code": SecurityErrorCodes.INVALID_JWT_SIGNATURE,
"message": SecurityErrorCodes.INVALID_JWT_SIGNATURE,
},
)
)
mock_async_response_helper_instance.construct_error_async_response.return_value = (
Expand Down Expand Up @@ -214,6 +218,8 @@ async def test_link_async_invalid_signature(
assert actual_response.message.correlation_id == "error_correlation_id"
assert actual_response.message.ack_status == AsyncAck.NACK
assert actual_response.message.timestamp == error_response.message.timestamp
assert actual_response.message.error.code == "INVALID JWT SIGNATURE"
assert actual_response.message.error.message == "INVALID JWT SIGNATURE"


@pytest.mark.asyncio
Expand Down

0 comments on commit b1d45b5

Please sign in to comment.