Skip to content

Commit 075e960

Browse files
committed
test_tag/test_tags method assert fix in association tests
1 parent b28bb31 commit 075e960

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

tests/integ/sagemaker/lineage/test_action.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ def test_tag(action_obj, sagemaker_session):
9090
)["Tags"]
9191
if actual_tags:
9292
break
93-
# When sagemaker-client-config endpoint-url is passed as argument to hit beta,
94-
# length of actual tags will be 2
93+
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
94+
# length of actual tags will be greater than 1
9595
assert len(actual_tags) > 0
9696
assert actual_tags[0] == tag
9797

@@ -106,7 +106,7 @@ def test_tags(action_obj, sagemaker_session):
106106
)["Tags"]
107107
if actual_tags:
108108
break
109-
# When sagemaker-client-config endpoint-url is passed as argument to hit beta,
110-
# length of actual tags will be 2
109+
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
110+
# length of actual tags will be greater than 1
111111
assert len(actual_tags) > 0
112112
assert [actual_tags[-1]] == tags

tests/integ/sagemaker/lineage/test_artifact.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ def test_tag(artifact_obj, sagemaker_session):
121121
)["Tags"]
122122
if actual_tags:
123123
break
124-
# When sagemaker-client-config endpoint-url is passed as argument to hit beta,
125-
# length of actual tags will be 2
124+
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
125+
# length of actual tags will be greater than 1
126126
assert len(actual_tags) > 0
127127
assert actual_tags[0] == tag
128128

@@ -137,7 +137,7 @@ def test_tags(artifact_obj, sagemaker_session):
137137
)["Tags"]
138138
if actual_tags:
139139
break
140-
# When sagemaker-client-config endpoint-url is passed as argument to hit beta,
141-
# length of actual tags will be 2
140+
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
141+
# length of actual tags will be greater than 1
142142
assert len(actual_tags) > 0
143143
assert [actual_tags[-1]] == tags

tests/integ/sagemaker/lineage/test_association.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@ def test_set_tag(association_obj, sagemaker_session):
6666
if actual_tags:
6767
break
6868
time.sleep(1)
69-
assert len(actual_tags) == 1
69+
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
70+
# length of actual tags will be greater than 1
71+
assert len(actual_tags) > 0
7072
assert actual_tags[0] == tag
7173

7274

@@ -81,5 +83,7 @@ def test_tags(association_obj, sagemaker_session):
8183
if actual_tags:
8284
break
8385
time.sleep(1)
84-
assert len(actual_tags) == 1
85-
assert actual_tags == tags
86+
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
87+
# length of actual tags will be greater than 1
88+
assert len(actual_tags) > 0
89+
assert [actual_tags[-1]] == tags

tests/integ/sagemaker/lineage/test_context.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ def test_tag(context_obj, sagemaker_session):
8888
)["Tags"]
8989
if actual_tags:
9090
break
91-
# When sagemaker-client-config endpoint-url is passed as argument to hit beta,
92-
# length of actual tags will be 2
91+
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
92+
# length of actual tags will be greater than 1
9393
assert len(actual_tags) > 0
9494
assert actual_tags[0] == tag
9595

@@ -104,7 +104,7 @@ def test_tags(context_obj, sagemaker_session):
104104
)["Tags"]
105105
if actual_tags:
106106
break
107-
# When sagemaker-client-config endpoint-url is passed as argument to hit beta,
108-
# length of actual tags will be 2
107+
# When sagemaker-client-config endpoint-url is passed as argument to hit some endpoints,
108+
# length of actual tags will be greater than 1
109109
assert len(actual_tags) > 0
110110
assert [actual_tags[-1]] == tags

0 commit comments

Comments
 (0)