Skip to content

Commit 0689262

Browse files
committed
Added assert on error message
1 parent 3325e24 commit 0689262

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Diff for: tests/unit/test_service_steps.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import boto3
1616
import pytest
17+
import re
1718

1819
from unittest.mock import patch
1920
from stepfunctions.steps.service import DynamoDBGetItemStep, DynamoDBPutItemStep, DynamoDBUpdateItemStep, DynamoDBDeleteItemStep
@@ -729,7 +730,10 @@ def test_databrew_start_job_run_step_creation_call_and_continue():
729730

730731
@patch.object(boto3.session.Session, 'region_name', 'us-east-1')
731732
def test_databrew_start_job_run_step_creation_wait_for_task_token_raises_error():
732-
with pytest.raises(ValueError):
733+
error_message = re.escape(f"Integration Pattern ({IntegrationPattern.WaitForTaskToken.name}) is not supported for this step - "
734+
f"Please use one of the following: "
735+
f"{[IntegrationPattern.WaitForCompletion.name, IntegrationPattern.CallAndContinue.name]}")
736+
with pytest.raises(ValueError, match=error_message):
733737
GlueDataBrewStartJobRunStep('Start Glue DataBrew Job Run - WaitForTaskToken',
734738
integration_pattern=IntegrationPattern.WaitForTaskToken)
735739

0 commit comments

Comments
 (0)