@@ -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 )
0 commit comments