diff options
author | kerem <hallackerem@gmail.com> | 2016-12-23 00:25:38 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2017-01-03 17:13:52 +0000 |
commit | c2e69df36464437d70c4396a4bc5932e6a97a0ff (patch) | |
tree | c7c65750ea04850b5a824c1f82ecb5f212806b17 /sw/qa | |
parent | f1dcb8b3e2e01848d44dd1beb82cd4e6e68a2acd (diff) |
tdf#97361: Changed method calls in check_flies
Change-Id: I6148ffccd4284cfc72fed2c7f4538054a5aaf24c
Reviewed-on: https://gerrit.libreoffice.org/32358
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/python/check_flies.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sw/qa/python/check_flies.py b/sw/qa/python/check_flies.py index 57fe4dbd3568..109d75bf80c0 100644 --- a/sw/qa/python/check_flies.py +++ b/sw/qa/python/check_flies.py @@ -61,7 +61,7 @@ class CheckFlies(unittest.TestCase): vExpectedEmbeddedFrames.remove(sFrameName) # raises ValueError if not found print (sFrameName) - xEmbeddedFrames.getByName(sFrameName) + xEmbeddedFrames[sFrameName] self.assertTrue(xEmbeddedFrames.hasByName(sFrameName), "Could not find embedded frame by name.") @@ -69,9 +69,9 @@ class CheckFlies(unittest.TestCase): xEmbeddedFramesIdx = xEmbeddedFrames - self.assertEqual(nEmbeddedFrames, xEmbeddedFramesIdx.getCount(), "Unexpected number of embedded frames reported") + self.assertEqual(nEmbeddedFrames, len(xEmbeddedFramesIdx), "Unexpected number of embedded frames reported") - for nCurrentFrameIdx in range(xEmbeddedFramesIdx.getCount()): + for nCurrentFrameIdx in range(len(xEmbeddedFramesIdx)): xEmbeddedFramesIdx.getByIndex(nCurrentFrameIdx) def checkGraphicFrames(self, xTGOS): @@ -82,7 +82,7 @@ class CheckFlies(unittest.TestCase): for sFrameName in xGraphicFrames.getElementNames(): vExpectedGraphicFrames.remove(sFrameName) # raises ValueError if not found - xGraphicFrames.getByName(sFrameName) + xGraphicFrames[sFrameName] self.assertTrue( xGraphicFrames.hasByName(sFrameName), "Could not find graphics frame by name.") @@ -91,9 +91,9 @@ class CheckFlies(unittest.TestCase): "Missing expected graphics frames.") xGraphicFramesIdx = xGraphicFrames - self.assertEqual(nGraphicFrames, xGraphicFramesIdx.getCount(), "Unexpected number of graphics frames reported") + self.assertEqual(nGraphicFrames, len(xGraphicFramesIdx), "Unexpected number of graphics frames reported") - for nCurrentFrameIdx in range(xGraphicFramesIdx.getCount()): + for nCurrentFrameIdx in range(len(xGraphicFramesIdx)): xGraphicFramesIdx.getByIndex(nCurrentFrameIdx) def checkTextFrames(self, xTFS): @@ -105,7 +105,7 @@ class CheckFlies(unittest.TestCase): for sFrameName in xTextFrames.getElementNames(): vExpectedTextFrames.remove(sFrameName) # raises ValueError if not found - xTextFrames.getByName(sFrameName) + xTextFrames[sFrameName] self.assertTrue( xTextFrames.hasByName(sFrameName), "Could not find text frame by name.") @@ -115,9 +115,9 @@ class CheckFlies(unittest.TestCase): xTextFramesIdx = xTextFrames - self.assertEqual(nTextFrames, xTextFrames.getCount(), "Unexpected number of text frames reported") + self.assertEqual(nTextFrames, len(xTextFrames), "Unexpected number of text frames reported") - for nCurrentFrameIdx in range(xTextFramesIdx.getCount()): + for nCurrentFrameIdx in range(len(xTextFramesIdx)): xTextFramesIdx.getByIndex(nCurrentFrameIdx) |