Exemplo n.º 1
0
def test_updateItemsForFolder_shouldNotCallHandler():
    countingListener = mocks.CountingMenuListener()
    menu = Menu(mainFolder)
    menu.addListener(countingListener.handler)
    menu._updateItemsForFolder(mainFolder, mainFolder.items(), 0, False)
    assert len(countingListener.calls) == 0
Exemplo n.º 2
0
def test_updateItemsForFolder_shouldDoNothingForDifferentFolder():
    menu = Menu(mainFolder)
    menu._updateItemsForFolder(folder2, folder2.items(), 0, False)
    assert menu.folder() is mainFolder
    assert menu.item() is folder1