Пример #1
0
 def test_hides_single_subvalue(self):
     tag = GroupTag('type', 'value1', 'value2', hidden=False)
     tag.subtag('value2').append('cart')
     tag.subtag('value2').append('blart')
     tag.subtag('value2').hide_value('cart')
     header = tag.to_header()
     assert '@hide type >> value2 >> cart' in header
Пример #2
0
 def test_hides_all_subtags(self):
     tag = GroupTag('group', 'value1', 'value2', 'value3', hidden=False)
     tag.subtag('value1').append('subvalue')
     tag.subtag('value1').hidden = True
     tag.sanitize()
     assert not tag.subtag('value1')
Пример #3
0
 def test_hides_subvalues(self):
     tag = GroupTag('type', 'value1', 'value2', hidden=False)
     tag.subtag('value2').append('cart')
     tag.subtag('value2').hidden = True
     header = tag.to_header()
     assert '@hide type >> value2 >> subtags' in header