Skip to content

Commit e8e3d46

Browse files
committed
Remove pytest fixture and fix test_tag/s method
1 parent ca24236 commit e8e3d46

File tree

3 files changed

+24
-24
lines changed

3 files changed

+24
-24
lines changed

tests/integ/sagemaker/lineage/test_action.py

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

9898

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

tests/integ/sagemaker/lineage/test_artifact.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ def test_tag(artifact_obj, sagemaker_session):
9999
)["Tags"]
100100
if actual_tags:
101101
break
102-
103-
if len(actual_tags) == 1:
104-
assert len(actual_tags) == 1
105-
assert actual_tags[0] == tag
102+
# When sagemaker-client-config endpoint-url is passed as argument to hit beta,
103+
# length of actual tags will be 2
104+
assert len(actual_tags) > 0
105+
assert actual_tags[0] == tag
106106

107107

108108
def test_tags(artifact_obj, sagemaker_session):
@@ -115,7 +115,7 @@ def test_tags(artifact_obj, sagemaker_session):
115115
)["Tags"]
116116
if actual_tags:
117117
break
118-
119-
if len(actual_tags) == 1:
120-
assert len(actual_tags) == 1
121-
assert actual_tags == tags
118+
# When sagemaker-client-config endpoint-url is passed as argument to hit beta,
119+
# length of actual tags will be 2
120+
assert len(actual_tags) > 0
121+
assert [actual_tags[-1]] == tags

tests/integ/sagemaker/lineage/test_context.py

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

9696

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

0 commit comments

Comments
 (0)