8000 test: update_tags item doesn't have tags attributes · tableau/server-client-python@cc4e47a · GitHub
[go: up one dir, main page]

Skip to content

Commit cc4e47a

Browse files
committed
test: update_tags item doesn't have tags attributes
1 parent 99d330f commit cc4e47a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/test_tagging.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,13 @@ def test_delete_tags(get_server, endpoint_type, item, tags) -> None:
157157
@pytest.mark.parametrize("endpoint_type, item", *sample_taggable_items)
158158
@pytest.mark.parametrize("tags", sample_tags)
159159
def test_update_tags 8000 (get_server, endpoint_type, item, tags) -> None:
160-
if isinstance(item, str):
161-
return
162160
endpoint = getattr(get_server, endpoint_type)
163161
id_ = getattr(item, "id", item)
164162
tags = set([tags] if isinstance(tags, str) else tags)
165163
with ExitStack() as stack:
166-
if hasattr(item, "_initial_tags"):
164+
if isinstance(item, str):
165+
stack.enter_context(pytest.raises((ValueError, NotImplementedError)))
166+
elif hasattr(item, "_initial_tags"):
167167
initial_tags = set(["x", "y", "z"])
168168
item._initial_tags = initial_tags
169169
add_tags_xml = add_tag_xml_response_factory(tags - initial_tags)

0 commit comments

Comments
 (0)
0