Exemple #1
0
 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)
Exemple #2
0
 def test_add_to(self):
     Menu.add(name='G', to=find('A'))
     expected = (('A',(('G',),)),('B',),('C',),('D',),('E',),('F',))
     self.assertEqualTree(expected)
Exemple #3
0
 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)
Exemple #4
0
 def test_add(self):
     Menu.add(name='G')
     expected = (('A',),('B',),('C',),('D',),('E',),('F',),('G',))
     self.assertEqualTree(expected)