Skip to content

Commit ff1c47c

Browse files
authored
fix: update exception assertion with new api change (#1823)
1 parent 716b259 commit ff1c47c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

tests/integ/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,6 @@
113113
"eu-south-1",
114114
]
115115
NO_AUTO_ML_REGIONS = [
116-
"sa-east-1",
117-
"me-south-1",
118-
"ap-east-1",
119116
"eu-west-3",
120117
"af-south-1",
121118
"eu-south-1",

tests/integ/test_auto_ml.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import tests.integ
1919
from sagemaker import AutoML, CandidateEstimator, AutoMLInput
2020

21-
from sagemaker.exceptions import UnexpectedStatusException
21+
from botocore.exceptions import ClientError
2222
from sagemaker.utils import unique_name_from_base
2323
from tests.integ import DATA_DIR, AUTO_ML_DEFAULT_TIMEMOUT_MINUTES, auto_ml_utils
2424
from tests.integ.timeout import timeout
@@ -142,7 +142,9 @@ def test_auto_ml_invalid_target_attribute(sagemaker_session):
142142
job_name = unique_name_from_base("auto-ml", max_length=32)
143143
inputs = sagemaker_session.upload_data(path=TRAINING_DATA, key_prefix=PREFIX + "/input")
144144
with pytest.raises(
145-
UnexpectedStatusException, match="Could not complete the data builder processing job."
145+
ClientError,
146+
match=r"An error occurred \(ValidationException\) when calling the CreateAutoMLJob "
147+
"operation: Target attribute name y does not exist in header.",
146148
):
147149
auto_ml.fit(inputs, job_name=job_name)
148150

0 commit comments

Comments
 (0)