def test_add_after(self): Menu.add(name='G', after=find('A')) expected = ((x,) for x in 'A,G,B,C,D,E,F'.split(',')) self.assertEqualTree(expected)
def test_add_to(self): Menu.add(name='G', to=find('A')) expected = (('A',(('G',),)),('B',),('C',),('D',),('E',),('F',)) self.assertEqualTree(expected)
def test_add_before(self): Menu.add(name='G', before=find('A')) expected = ((x,) for x in 'G,A,B,C,D,E,F'.split(',')) self.assertEqualTree(expected)
def test_add(self): Menu.add(name='G') expected = (('A',),('B',),('C',),('D',),('E',),('F',),('G',)) self.assertEqualTree(expected)