Skip to content

Commit ef4bc00

Browse files
committed
Update integration tests. Test more of tag content items
1 parent e753556 commit ef4bc00

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

integration/tests/posit/connect/test_tags.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -140,22 +140,27 @@ def test_tag_content_items(self):
140140
assert len(tagC.content_items.find()) == 3
141141

142142
# Make sure unique content items are found
143-
child_content_items = tagA.child_tags.content_items.find()
144-
assert len(child_content_items) == 2
145-
child_content_item_guids = [content_item["guid"] for content_item in child_content_items]
146-
assert child_content_item_guids == [self.contentB["guid"], self.contentC["guid"]]
143+
assert len(tagB.child_tags.content_items.find()) == 0
144+
assert len(tagD.child_tags.content_items.find()) == 0
145+
assert len(tagB.descendant_tags.content_items.find()) == 0
146+
assert len(tagD.descendant_tags.content_items.find()) == 0
147+
148+
child_content_items = tagC.child_tags.content_items.find()
149+
assert len(child_content_items) == 1
150+
child_content_item_guids = {content_item["guid"] for content_item in child_content_items}
151+
assert child_content_item_guids == {self.contentA["guid"]}
147152

148153
descendant_content_items = tagA.descendant_tags.content_items.find()
149154
assert len(descendant_content_items) == 3
150155

151-
descendant_content_item_guids = [
156+
descendant_content_item_guids = {
152157
content_item["guid"] for content_item in descendant_content_items
153-
]
154-
assert descendant_content_item_guids == [
158+
}
159+
assert descendant_content_item_guids == {
155160
self.contentA["guid"],
156161
self.contentB["guid"],
157162
self.contentC["guid"],
158-
]
163+
}
159164

160165
self.contentA.tags.delete(tagRoot)
161166
self.contentB.tags.delete(tagRoot)

src/posit/connect/tags.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,6 @@ def find(self, /, **kwargs) -> list[Tag]:
522522
kwargs, # pyright: ignore[reportArgumentType]
523523
)
524524
url = self._ctx.url + self._path
525-
print("barret", url, updated_kwargs)
526525

527526
response = self._ctx.session.get(url, params=updated_kwargs)
528527
results = response.json()

0 commit comments

Comments
 (0)