tdf#97361: Changed method calls in sfx2 python tests

Change-Id: Id47bf9c6bb6330bf964ca3272487a077fb664137
Reviewed-on: https://gerrit.libreoffice.org/32838
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
This commit is contained in:
kerem 2017-01-08 13:15:53 +02:00 committed by jan iversen
parent c695869fd8
commit 9f18ee7fd9
2 changed files with 8 additions and 8 deletions

View File

@ -59,10 +59,10 @@ class CheckSidebar(unittest.TestCase):
assert ( first_deck_name in deck_element_names )
assert ( xDecks.hasByName(first_deck_name) )
decks_count = xDecks.getCount()
decks_count = len(xDecks)
self.assertEqual ( 5, decks_count )
xDeck = xDecks.getByName(first_deck_name)
xDeck = xDecks[first_deck_name]
assert ( xDeck )
assert ( xDeck.getId() == first_deck_name )
@ -91,7 +91,7 @@ class CheckSidebar(unittest.TestCase):
xPanels = xDeck.getPanels()
panels_count = xPanels.getCount()
panels_count = len(xPanels)
self.assertEqual ( panels_count, 5 )
first_panel_name = self.getFirstPanel(xPanels)
@ -100,7 +100,7 @@ class CheckSidebar(unittest.TestCase):
assert ( first_panel_name in panel_element_names )
assert ( xPanels.hasByName(first_panel_name) )
xPanel = xPanels.getByName(first_panel_name)
xPanel = xPanels[first_panel_name]
assert ( xPanel )
assert ( xPanel.getId() == first_panel_name )
@ -129,7 +129,7 @@ class CheckSidebar(unittest.TestCase):
last_panel_name = self.getLastPanel(xPanels)
other_panel = xPanels.getByName(last_panel_name)
other_panel = xPanels[last_panel_name]
other_panel.expand(False)
assert( other_panel.isExpanded() )

View File

@ -45,7 +45,7 @@ class CheckSidebarRegistry(unittest.TestCase):
(param, ))
for nodeName in sidebar_decks_settings:
node = sidebar_decks_settings.getByName(nodeName)
node = sidebar_decks_settings[nodeName]
if (node.Id != nodeName):
print("\nNon-consistent sidebar.xcu Deck registry names", nodeName, node.Id)
@ -59,7 +59,7 @@ class CheckSidebarRegistry(unittest.TestCase):
(param, ))
for nodeName in sidebar_panels_settings:
node = sidebar_panels_settings.getByName(nodeName)
node = sidebar_panels_settings[nodeName]
if (node.Id != nodeName):
print("\nNon-consistent sidebar.xcu Panel registry names", nodeName, node.Id)
@ -68,7 +68,7 @@ class CheckSidebarRegistry(unittest.TestCase):
# is panel bound to an existing Deck ?
FoundDeckId = False
for deckNodeName in sidebar_decks_settings:
deck_node = sidebar_decks_settings.getByName(deckNodeName)
deck_node = sidebar_decks_settings[deckNodeName]
if (node.DeckId == deck_node.Id):
FoundDeckId = True
if not FoundDeckId: